MediaWiki
1.27.2
|
MediaWikiServices is the service locator for the application scope of MediaWiki. More...
Public Member Functions | |
__construct (Config $config) | |
getBootstrapConfig () | |
Returns the Config object containing the bootstrap configuration. More... | |
getConfigFactory () | |
getEventRelayerGroup () | |
getMainConfig () | |
Returns the Config object that provides configuration for MediaWiki core. More... | |
getSearchEngineConfig () | |
getSearchEngineFactory () | |
getSiteLookup () | |
getSiteStore () | |
getSkinFactory () | |
getStatsdDataFactory () | |
newSearchEngine () | |
Public Member Functions inherited from MediaWiki\Services\ServiceContainer | |
__construct (array $extraInstantiationParams=[]) | |
applyWiring (array $serviceInstantiators) | |
Registers multiple services (aka a "wiring"). More... | |
defineService ($name, callable $instantiator) | |
Define a new service. More... | |
getService ($name) | |
Returns a service object of the kind associated with $name. More... | |
getServiceNames () | |
hasService ($name) | |
Returns true if a service is defined for $name, that is, if a call to getService( $name ) would return a service instance. More... | |
loadWiringFiles (array $wiringFiles) | |
redefineService ($name, callable $instantiator) | |
Replace an already defined service. More... | |
Static Public Member Functions | |
static | getInstance () |
Returns the global default instance of the top level service locator. More... | |
MediaWikiServices is the service locator for the application scope of MediaWiki.
Its implemented as a simple configurable DI container. MediaWikiServices acts as a top level factory/registry for top level services, and builds the network of service objects that defines MediaWiki's application logic. It acts as an entry point to MediaWiki's dependency injection mechanism.
Services are defined in the "wiring" array passed to the constructor, or by calling defineService().
Definition at line 54 of file MediaWikiServices.php.
MediaWiki\MediaWikiServices::__construct | ( | Config | $config | ) |
Config | $config | The Config object to be registered as the 'BootstrapConfig' service. This has to contain at least the information needed to set up the 'ConfigFactory' service. |
Definition at line 95 of file MediaWikiServices.php.
References use.
MediaWiki\MediaWikiServices::getBootstrapConfig | ( | ) |
Returns the Config object containing the bootstrap configuration.
Bootstrap configuration would typically include database credentials and other information that may be needed before the ConfigFactory service can be instantiated.
Definition at line 116 of file MediaWikiServices.php.
MediaWiki\MediaWikiServices::getConfigFactory | ( | ) |
Definition at line 123 of file MediaWikiServices.php.
MediaWiki\MediaWikiServices::getEventRelayerGroup | ( | ) |
Definition at line 161 of file MediaWikiServices.php.
|
static |
Returns the global default instance of the top level service locator.
The default instance is initialized using the service instantiator functions defined in ServiceWiring.php.
Definition at line 68 of file MediaWikiServices.php.
References Hooks\run().
MediaWiki\MediaWikiServices::getMainConfig | ( | ) |
Returns the Config object that provides configuration for MediaWiki core.
This may or may not be the same object that is returned by getBootstrapConfig().
Definition at line 133 of file MediaWikiServices.php.
MediaWiki\MediaWikiServices::getSearchEngineConfig | ( | ) |
Definition at line 183 of file MediaWikiServices.php.
MediaWiki\MediaWikiServices::getSearchEngineFactory | ( | ) |
Definition at line 176 of file MediaWikiServices.php.
MediaWiki\MediaWikiServices::getSiteLookup | ( | ) |
Definition at line 140 of file MediaWikiServices.php.
MediaWiki\MediaWikiServices::getSiteStore | ( | ) |
Definition at line 147 of file MediaWikiServices.php.
MediaWiki\MediaWikiServices::getSkinFactory | ( | ) |
Definition at line 190 of file MediaWikiServices.php.
MediaWiki\MediaWikiServices::getStatsdDataFactory | ( | ) |
Definition at line 154 of file MediaWikiServices.php.
MediaWiki\MediaWikiServices::newSearchEngine | ( | ) |
Definition at line 168 of file MediaWikiServices.php.