PHP Class DataSift\Storyplayer\ConfigLib\ConfigList

Afficher le fichier Open project: datasift/storyplayer Class Usage Examples

Méthodes publiques

Méthode Description
__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

Méthodes protégées

Méthode Description
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

Method Details

__construct() public méthode

constructor
public __construct ( $configType, $searchFolders )

addEntry() public méthode

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() public méthode

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

findConfigFilenames() protected méthode

build a list of the config files in the $searchFolder
protected findConfigFilenames ( $searchPattern ) : array
Résultat array

findConfigs() public méthode

find a list of config files in a folder, and load them
public findConfigs ( ) : void
Résultat void

findJsonConfigs() protected méthode

find a list of SPv2.0-style JSON configs
protected findJsonConfigs ( ) : array
Résultat array

findPhpConfigs() protected méthode

find a list of SPv2.3-style PHP configs
protected findPhpConfigs ( ) : array
Résultat array

getConfigType() public méthode

what type of content are we a list of?
public getConfigType ( ) : string
Résultat string

getEntries() public méthode

returns our list of all known configs
public getEntries ( ) : array
Résultat array

getEntry() public méthode

retrieve a single config entry
public getEntry ( string $name ) : array | object
$name string the name of the config to retrieve
Résultat array | object

getEntryNames() public méthode

returns the names of all of the entries in our list
public getEntryNames ( ) : array
Résultat array

getSearchFolders() public méthode

returns the folders where we look for config files
public getSearchFolders ( ) : array
Résultat array

getWrappedConfigClassname() public méthode

returns a classname you can use for creating objects
public getWrappedConfigClassname ( ) : string
Résultat string

hasEntry() public méthode

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

newWrappedConfigObject() public méthode

returns a object of the correct type for the content we are listing
public newWrappedConfigObject ( ) : object
Résultat object

setConfigType() public méthode

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() public méthode

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