PHP 클래스 DataSift\Storyplayer\ConfigLib\WrappedConfig

저자: Stuart Herbert ([email protected])
파일 보기 프로젝트 열기: datasift/storyplayer 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( $isArray = false ) constructor
getArray ( string $path ) : array retrieve data from a dot.notation.path
getConfig ( ) : array | object get the config that we wrap
getData ( string $path ) : mixed retrieve data using a dot.notation.path
getExpandedConfig ( array | object | null $baseConfig = null ) : array | object expand any variables in $this
getFilename ( ) : string | null returns the filename we loaded this config from
getName ( ) : string | null returns the name assigned to this config
getObject ( string $path ) : object retrieve data from a dot.notation.path
hasData ( string $path ) : boolean check for existence of data using a dot.notation.path
loadConfigFromFile ( string $pathToFile ) : void load a config file from disk, and store the config in $this
mergeData ( string $path, mixed $dataToMerge ) : void merge data into this config
setConfig ( array | object $config ) store the config that we wrap
setData ( string $path, mixed $data ) : void assigns data to a specific path
setFilename ( string $filename ) sets the filename that we loaded this config from
setName ( string $name ) assigns a name to this config
unsetData ( string $path ) : void remove data using a dot.notation.path

메소드 상세

__construct() 공개 메소드

constructor
public __construct ( $isArray = false )

getArray() 공개 메소드

throws an exception if the path does not point to an array
public getArray ( string $path ) : array
$path string the dot.notation.path to the data to return
리턴 array

getConfig() 공개 메소드

get the config that we wrap
public getConfig ( ) : array | object
리턴 array | object

getData() 공개 메소드

NOTE that you should treat any data returned from here as READ-ONLY
public getData ( string $path ) : mixed
$path string the dot.notation.path to use to navigate
리턴 mixed

getExpandedConfig() 공개 메소드

expand any variables in $this
public getExpandedConfig ( array | object | null $baseConfig = null ) : array | object
$baseConfig array | object | null the config to use for expanding variables (optional)
리턴 array | object a copy of the config stored in $this, with any Twig variables expanded

getFilename() 공개 메소드

returns the filename we loaded this config from
public getFilename ( ) : string | null
리턴 string | null

getName() 공개 메소드

returns the name assigned to this config
public getName ( ) : string | null
리턴 string | null

getObject() 공개 메소드

throws an exception if the path does not point to an object
public getObject ( string $path ) : object
$path string the dot.notation.path to the data to return
리턴 object

hasData() 공개 메소드

check for existence of data using a dot.notation.path
public hasData ( string $path ) : boolean
$path string the dot.notation.path to use to navigate
리턴 boolean

loadConfigFromFile() 공개 메소드

load a config file from disk, and store the config in $this
public loadConfigFromFile ( string $pathToFile ) : void
$pathToFile string the filename to load from
리턴 void

mergeData() 공개 메소드

merge data into this config
public mergeData ( string $path, mixed $dataToMerge ) : void
$path string path.to.merge.to
$dataToMerge mixed the data to merge at $path
리턴 void

setConfig() 공개 메소드

store the config that we wrap
public setConfig ( array | object $config )
$config array | object the config to store

setData() 공개 메소드

assigns data to a specific path
public setData ( string $path, mixed $data ) : void
$path string the path to assign to
$data mixed the data to assign
리턴 void

setFilename() 공개 메소드

sets the filename that we loaded this config from
public setFilename ( string $filename )
$filename string the filename to store

setName() 공개 메소드

assigns a name to this config
public setName ( string $name )
$name string the name to assign

unsetData() 공개 메소드

remove data using a dot.notation.path
public unsetData ( string $path ) : void
$path string the dot.notation.path to use to navigate
리턴 void