Manual:MediaWikiServices.php
Appearance
MediaWiki file: MediaWikiServices.php | |
---|---|
Location: | includes/ |
Source code: | master • 1.42.3 • 1.41.4 • 1.39.10 |
Classes: | MediaWiki\MediaWikiServices |
Available since MediaWiki 1.27, MediaWikiServices.php offers an important central class for Service Location and Dependency Injection (DI). Many of MediaWiki's core services are called from here.
Examples of public methods:
- getInstance() - get a reference to a service container
- getService()
- getAuthManager() - get AuthManager as a service
- getBlobStore() - ... BlobStore
- getCentralIdLookup()- ... CentralIdLookup
- getCollationFactory() - ... CollationFactory
- getConfigSchema()
- getContentHandlerFactory() - ... ContentHandlerFactory
- getContentHandler() - ... ContentHandler
- getContentLanguage()
- getContentRenderer() - ...ContentRenderer (since 1.38)
- getContentTransformer() - ...ContentTransformer (since 1.37)
- getNamespaceInfo() - ... NamespaceInfo
- getPageProps() - ... PageProps
- getParser() - ... Parser
- getParserCache() - ... ParserCache
- getParserCacheFactory() - ... ParserCacheFactory (MW 1.36+)
- getParserFactory() - ... ParserFactory
- getParserOutputAccess() - ... ParserOutputAccess (MW 1.36+)
- getRepoGroup() - ... RepoGroup
- getRevisionFactory() - ... RevisionFactory
- getRevisionLookup() - ... RevisionLookup
- getRevisionRenderer() - ... RevisionRenderer
- getRevisionStore() - ... RevisionStore
- getRevisionStoreFactory() - ... RevisionStoreFactory
- getRollbackPageFactory() - ... RollbackPageFactory
- getWikiPageFactory() - ... WikiPageFactory
See also
[edit]- Dependency Injection
- Manual:ServiceWiring.php
- Manual:ServiceContainer.php (removed in 1.35)