MediaWiki
1.23.2
|
Factory class to create Config objects. More...
Public Member Functions | |
makeConfig ( $name) | |
Create a given Config using the registered callback for $name. More... | |
register ( $name, $callback) | |
Register a new config factory function Will override if it's already registered. More... | |
Static Public Member Functions | |
static | getDefaultInstance () |
Protected Attributes | |
array | $configs = array() |
Config objects that have already been created name => Config object. More... | |
array | $factoryFunctions = array() |
Map of config name => callback. More... | |
|
static |
Definition at line 42 of file ConfigFactory.php.
References $name, $self, as, and global.
Referenced by RequestContext\getConfig().
ConfigFactory::makeConfig | ( | $name | ) |
Create a given Config using the registered callback for $name.
If an object was already created, the same Config object is returned.
string | $name | of the extension/component you want a Config object for 'main' is used for core |
ConfigException | if a factory function isn't registered for $name |
UnexpectedValueException | if the factory function returns a non-Config object |
Definition at line 77 of file ConfigFactory.php.
References $name.
ConfigFactory::register | ( | $name, | |
$callback | |||
) |
Register a new config factory function Will override if it's already registered.
string | $name | |
callable | $callback | that takes this ConfigFactory as an argument |
InvalidArgumentException | if an invalid callback is provided |
Definition at line 61 of file ConfigFactory.php.
References $name.
Config objects that have already been created name => Config object.
Definition at line 40 of file ConfigFactory.php.
Map of config name => callback.
Definition at line 34 of file ConfigFactory.php.