PHP Класс DataSift\Storyplayer\ConfigLib\ConfigList

Автор: Stuart Herbert ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__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
public getWrappedConfigClassname ( ) : string
Результат string

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