PHP 클래스 DataSift\Storyplayer\ConfigLib\ConfigList

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

공개 메소드들

메소드 설명
__construct ( $configType, $searchFolders ) constructor
addEntry ( string $name, object $config ) inject a config into our list
addHardCodedList ( HardCodedList $hardCodedDefaults ) add config entries from a hard-coded list
findConfigs ( ) : void find a list of config files in a folder, and load them
getConfigType ( ) : string what type of content are we a list of?
getEntries ( ) : array returns our list of all known configs
getEntry ( string $name ) : array | object retrieve a single config entry
getEntryNames ( ) : array returns the names of all of the entries in our list
getSearchFolders ( ) : array returns the folders where we look for config files
getWrappedConfigClassname ( ) : string returns a classname you can use for creating objects
hasEntry ( string $name ) : boolean do we have a config entry called $name?
newWrappedConfigObject ( ) : object returns a object of the correct type for the content we are listing
setConfigType ( string $configType ) tells us what type of content we are going to be a list of
setSearchFolders ( array $searchFolders ) tells us where to look for config files

보호된 메소드들

메소드 설명
findConfigFilenames ( $searchPattern ) : array build a list of the config files in the $searchFolder
findJsonConfigs ( ) : array find a list of SPv2.0-style JSON configs
findPhpConfigs ( ) : array find a list of SPv2.3-style PHP configs

메소드 상세

__construct() 공개 메소드

constructor
public __construct ( $configType, $searchFolders )

addEntry() 공개 메소드

useful for adding in hard-coded config options
public addEntry ( string $name, object $config )
$name string the name of the config to inject
$config object the config to inject into our list

addHardCodedList() 공개 메소드

add config entries from a hard-coded list
public addHardCodedList ( HardCodedList $hardCodedDefaults )
$hardCodedDefaults HardCodedList the entries to add

findConfigFilenames() 보호된 메소드

build a list of the config files in the $searchFolder
protected findConfigFilenames ( $searchPattern ) : array
리턴 array

findConfigs() 공개 메소드

find a list of config files in a folder, and load them
public findConfigs ( ) : void
리턴 void

findJsonConfigs() 보호된 메소드

find a list of SPv2.0-style JSON configs
protected findJsonConfigs ( ) : array
리턴 array

findPhpConfigs() 보호된 메소드

find a list of SPv2.3-style PHP configs
protected findPhpConfigs ( ) : array
리턴 array

getConfigType() 공개 메소드

what type of content are we a list of?
public getConfigType ( ) : string
리턴 string

getEntries() 공개 메소드

returns our list of all known configs
public getEntries ( ) : array
리턴 array

getEntry() 공개 메소드

retrieve a single config entry
public getEntry ( string $name ) : array | object
$name string the name of the config to retrieve
리턴 array | object

getEntryNames() 공개 메소드

returns the names of all of the entries in our list
public getEntryNames ( ) : array
리턴 array

getSearchFolders() 공개 메소드

returns the folders where we look for config files
public getSearchFolders ( ) : array
리턴 array

getWrappedConfigClassname() 공개 메소드

returns a classname you can use for creating objects

hasEntry() 공개 메소드

do we have a config entry called $name?
public hasEntry ( string $name ) : boolean
$name string the name of the config to check for
리턴 boolean

newWrappedConfigObject() 공개 메소드

returns a object of the correct type for the content we are listing
public newWrappedConfigObject ( ) : object
리턴 object

setConfigType() 공개 메소드

tells us what type of content we are going to be a list of
public setConfigType ( string $configType )
$configType string the name of a class from ConfigLib

setSearchFolders() 공개 메소드

tells us where to look for config files
public setSearchFolders ( array $searchFolders )
$searchFolders array