PHP 클래스 Zend_Config_Yaml

상속: extends Zend_Config
파일 보기 프로젝트 열기: dbpatch/dbpatch 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_ignoreConstants boolean Whether or not to ignore constants in parsed YAML
$_skipExtends boolean Whether to skip extends or not
$_yamlDecoder callable What to call when we need to decode some YAML?

공개 메소드들

메소드 설명
__construct ( string $yaml, mixed $section = null, boolean $options = false ) Loads the section $section from the config file encoded as YAML
decode ( string $yaml ) : array Very dumb YAML parser
getYamlDecoder ( ) : callable Get callback for decoding YAML
ignoreConstants ( ) : boolean Whether parser should ignore constants or not
setIgnoreConstants ( boolean $flag ) : void Indicate whether parser should ignore constants or not
setYamlDecoder ( callable $yamlDecoder ) : Zend_Config_Yaml Set callback for decoding YAML

보호된 메소드들

메소드 설명
_decodeYaml ( integer $currentIndent, array &$lines ) : array | string Service function to decode YAML
_getConstants ( ) : array Get (reverse) sorted list of defined constant names
_processExtends ( array $data, string $section, array $config = [] ) : array Helper function to process each element in the section and handle the "_extends" inheritance attribute.
_replaceConstants ( string $value ) : string Replace any constants referenced in a string with their values

메소드 상세

__construct() 공개 메소드

Sections are defined as properties of the main object In order to extend another section, a section defines the "_extends" property having a value of the section name from which the extending section inherits values. Note that the keys in $section will override any keys of the same name in the sections that have been included via "_extends". Options may include: - allow_modifications: whether or not the config object is mutable - skip_extends: whether or not to skip processing of parent configuration - yaml_decoder: a callback to use to decode the Yaml source
public __construct ( string $yaml, mixed $section = null, boolean $options = false )
$yaml string YAML file to process
$section mixed Section to process
$options boolean Whether modifiacations are allowed at runtime

_decodeYaml() 보호된 정적인 메소드

Service function to decode YAML
protected static _decodeYaml ( integer $currentIndent, array &$lines ) : array | string
$currentIndent integer Current indent level
$lines array YAML lines
리턴 array | string

_getConstants() 보호된 정적인 메소드

Get (reverse) sorted list of defined constant names
protected static _getConstants ( ) : array
리턴 array

_processExtends() 보호된 메소드

Helper function to process each element in the section and handle the "_extends" inheritance attribute.
protected _processExtends ( array $data, string $section, array $config = [] ) : array
$data array Data array to process
$section string Section to process
$config array Configuration which was parsed yet
리턴 array

_replaceConstants() 보호된 정적인 메소드

Replace any constants referenced in a string with their values
protected static _replaceConstants ( string $value ) : string
$value string
리턴 string

decode() 공개 정적인 메소드

Until we have Zend_Yaml...
public static decode ( string $yaml ) : array
$yaml string YAML source
리턴 array Decoded data

getYamlDecoder() 공개 메소드

Get callback for decoding YAML
public getYamlDecoder ( ) : callable
리턴 callable

ignoreConstants() 공개 정적인 메소드

Whether parser should ignore constants or not
public static ignoreConstants ( ) : boolean
리턴 boolean

setIgnoreConstants() 공개 정적인 메소드

Indicate whether parser should ignore constants or not
public static setIgnoreConstants ( boolean $flag ) : void
$flag boolean
리턴 void

setYamlDecoder() 공개 메소드

Set callback for decoding YAML
public setYamlDecoder ( callable $yamlDecoder ) : Zend_Config_Yaml
$yamlDecoder callable the decoder to set
리턴 Zend_Config_Yaml

프로퍼티 상세

$_ignoreConstants 보호되어 있는 정적으로 프로퍼티

Whether or not to ignore constants in parsed YAML
protected static bool $_ignoreConstants
리턴 boolean

$_skipExtends 보호되어 있는 프로퍼티

Whether to skip extends or not
protected bool $_skipExtends
리턴 boolean

$_yamlDecoder 보호되어 있는 프로퍼티

What to call when we need to decode some YAML?
protected callable $_yamlDecoder
리턴 callable