Open Journal Systems
3.3.0
|
Public Member Functions | |
addAlias ($filename, $alias) | |
load ($config, array $options=array()) | |
removeAlias ($alias) | |
Protected Member Functions | |
build ($config, array $options) | |
loadFile ($filename) | |
mergeData (array $a, array $b) | |
mergeIncludes (&$config, $basePath=null) | |
Protected Attributes | |
$aliases = array() | |
$loadedFiles = array() | |
Static Protected Attributes | |
static | $jsonErrors |
Abstract config loader
Definition at line 11 of file AbstractConfigLoader.php.
Guzzle\Service\AbstractConfigLoader::addAlias | ( | $filename, | |
$alias | |||
) |
Add an include alias to the loader
string | $filename | Filename to alias (e.g. _foo) |
string | $alias | Actual file to use (e.g. /path/to/foo.json) |
Definition at line 59 of file AbstractConfigLoader.php.
|
abstractprotected |
Perform the parsing of a config file and create the end result
array | $config | Configuration data |
array | $options | Options to use when building |
Reimplemented in Guzzle\Service\Builder\ServiceBuilderLoader, and Guzzle\Service\Description\ServiceDescriptionLoader.
Referenced by Guzzle\Service\AbstractConfigLoader\load().
Guzzle\Service\AbstractConfigLoader::load | ( | $config, | |
array | $options = array() |
||
) |
Loads configuration data and returns an array of the loaded result
mixed | $config | Data to load (filename or array of data) |
array | $options | Array of options to use when loading |
Implements Guzzle\Service\ConfigLoaderInterface.
Definition at line 35 of file AbstractConfigLoader.php.
References Guzzle\Service\AbstractConfigLoader\build(), Guzzle\Service\AbstractConfigLoader\loadFile(), and Guzzle\Service\AbstractConfigLoader\mergeIncludes().
|
protected |
Load a configuration file (can load JSON or PHP files that return an array when included)
string | $filename | File to load |
InvalidArgumentException | |
RuntimeException | when the JSON cannot be parsed |
Definition at line 99 of file AbstractConfigLoader.php.
References Guzzle\Service\AbstractConfigLoader\mergeIncludes().
Referenced by Guzzle\Service\AbstractConfigLoader\load(), and Guzzle\Service\AbstractConfigLoader\mergeIncludes().
|
protected |
Default implementation for merging two arrays of data (uses array_merge_recursive)
array | $a | Original data |
array | $b | Data to merge into the original and overwrite existing values |
Reimplemented in Guzzle\Service\Builder\ServiceBuilderLoader.
Definition at line 179 of file AbstractConfigLoader.php.
Referenced by Guzzle\Service\AbstractConfigLoader\mergeIncludes().
|
protected |
Merges in all include files
array | $config | Config data that contains includes |
string | $basePath | Base path to use when a relative path is encountered |
Definition at line 154 of file AbstractConfigLoader.php.
References Guzzle\Service\AbstractConfigLoader\loadFile(), and Guzzle\Service\AbstractConfigLoader\mergeData().
Referenced by Guzzle\Service\AbstractConfigLoader\load(), and Guzzle\Service\AbstractConfigLoader\loadFile().
Guzzle\Service\AbstractConfigLoader::removeAlias | ( | $alias | ) |
Remove an alias from the loader
string | $alias | Alias to remove |
Definition at line 73 of file AbstractConfigLoader.php.
|
protected |
Array of aliases for actual filenames
Definition at line 17 of file AbstractConfigLoader.php.
|
staticprotected |
Definition at line 26 of file AbstractConfigLoader.php.
|
protected |
Hash of previously loaded filenames
Definition at line 23 of file AbstractConfigLoader.php.