MediaWiki REL1_27
|
Factory class to create Config objects. More...
Public Member Functions | |
makeConfig ( $name) | |
Create a given Config using the registered callback for $name. | |
register ( $name, $callback) | |
Register a new config factory function Will override if it's already registered. | |
Static Public Member Functions | |
static | getDefaultInstance () |
Protected Attributes | |
array | $configs = [] |
Config objects that have already been created name => Config object. | |
array | $factoryFunctions = [] |
Map of config name => callback. | |
|
static |
Definition at line 49 of file ConfigFactory.php.
Referenced by MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProviderTest\getProvider(), MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProviderTest\getProvider(), MediaWiki\Auth\LegacyHookPreAuthenticationProviderTest\getProvider(), MediaWiki\Auth\AbstractPasswordPrimaryAuthenticationProviderTest\testCheckPasswordValidity(), MediaWiki\Auth\AbstractPasswordPrimaryAuthenticationProviderTest\testGetNewPasswordExpiry(), MediaWiki\Auth\AbstractPasswordPrimaryAuthenticationProviderTest\testGetPassword(), MediaWiki\Auth\AbstractPasswordPrimaryAuthenticationProviderTest\testGetPasswordFactory(), and MediaWiki\Auth\AbstractPasswordPrimaryAuthenticationProviderTest\testSetPasswordResetFlag().
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 | 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 76 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 60 of file ConfigFactory.php.
References $name.
|
protected |
Config objects that have already been created name => Config object.
Definition at line 42 of file ConfigFactory.php.
|
protected |
Map of config name => callback.
Definition at line 35 of file ConfigFactory.php.