use MediaWiki\Storage\RevisionLookup;
use MediaWiki\Storage\RevisionStore;
use OldRevisionImporter;
+use MediaWiki\Storage\RevisionStoreFactory;
use UploadRevisionImporter;
use Wikimedia\Rdbms\LBFactory;
use LinkCache;
use ObjectCache;
use Parser;
use ParserCache;
+use ParserFactory;
+use PasswordFactory;
use ProxyLookup;
use SearchEngine;
use SearchEngineConfig;
use TitleParser;
use VirtualRESTServiceClient;
use MediaWiki\Interwiki\InterwikiLookup;
+use MagicWordFactory;
/**
* Service locator for MediaWiki core services.
// CONVENIENCE GETTERS ////////////////////////////////////////////////////
+ /**
+ * @since 1.31
+ * @return ActorMigration
+ */
+ public function getActorMigration() {
+ return $this->getService( 'ActorMigration' );
+ }
+
+ /**
+ * @since 1.31
+ * @return BlobStore
+ */
+ public function getBlobStore() {
+ return $this->getService( '_SqlBlobStore' );
+ }
+
+ /**
+ * @since 1.31
+ * @return BlobStoreFactory
+ */
+ public function getBlobStoreFactory() {
+ return $this->getService( 'BlobStoreFactory' );
+ }
+
/**
* Returns the Config object containing the bootstrap configuration.
* Bootstrap configuration would typically include database credentials
}
/**
- * @since 1.27
- * @return ConfigFactory
+ * @since 1.32
+ * @return NameTableStore
*/
- public function getConfigFactory() {
- return $this->getService( 'ConfigFactory' );
+ public function getChangeTagDefStore() {
+ return $this->getService( 'ChangeTagDefStore' );
}
/**
- * Returns the Config object that provides configuration for MediaWiki core.
- * This may or may not be the same object that is returned by getBootstrapConfig().
- *
- * @since 1.27
- * @return Config
+ * @since 1.31
+ * @return CommentStore
*/
- public function getMainConfig() {
- return $this->getService( 'MainConfig' );
+ public function getCommentStore() {
+ return $this->getService( 'CommentStore' );
}
/**
* @since 1.27
- * @return SiteLookup
+ * @return ConfigFactory
*/
- public function getSiteLookup() {
- return $this->getService( 'SiteLookup' );
+ public function getConfigFactory() {
+ return $this->getService( 'ConfigFactory' );
}
/**
- * @since 1.27
- * @return SiteStore
+ * @since 1.32
+ * @return ConfigRepository
*/
- public function getSiteStore() {
- return $this->getService( 'SiteStore' );
+ public function getConfigRepository() {
+ return $this->getService( 'ConfigRepository' );
}
/**
- * @since 1.28
- * @return InterwikiLookup
+ * @since 1.29
+ * @return \ConfiguredReadOnlyMode
*/
- public function getInterwikiLookup() {
- return $this->getService( 'InterwikiLookup' );
+ public function getConfiguredReadOnlyMode() {
+ return $this->getService( 'ConfiguredReadOnlyMode' );
}
/**
- * @since 1.27
- * @return IBufferingStatsdDataFactory
+ * @since 1.32
+ * @return \Language
*/
- public function getStatsdDataFactory() {
- return $this->getService( 'StatsdDataFactory' );
+ public function getContentLanguage() {
+ return $this->getService( 'ContentLanguage' );
}
/**
- * @since 1.32
- * @return IBufferingStatsdDataFactory
+ * @since 1.31
+ * @return NameTableStore
*/
- public function getPerDbNameStatsdDataFactory() {
- return $this->getService( 'PerDbNameStatsdDataFactory' );
+ public function getContentModelStore() {
+ return $this->getService( 'ContentModelStore' );
}
/**
- * @since 1.27
- * @return EventRelayerGroup
+ * @since 1.28
+ * @return CryptHKDF
*/
- public function getEventRelayerGroup() {
- return $this->getService( 'EventRelayerGroup' );
+ public function getCryptHKDF() {
+ return $this->getService( 'CryptHKDF' );
}
/**
- * @since 1.27
- * @return SearchEngine
+ * @since 1.28
+ * @deprecated since 1.32, use random_bytes()/random_int()
+ * @return CryptRand
*/
- public function newSearchEngine() {
- // New engine object every time, since they keep state
- return $this->getService( 'SearchEngineFactory' )->create();
+ public function getCryptRand() {
+ return $this->getService( 'CryptRand' );
}
/**
- * @since 1.27
- * @return SearchEngineFactory
+ * @since 1.28
+ * @return LoadBalancer The main DB load balancer for the local wiki.
*/
- public function getSearchEngineFactory() {
- return $this->getService( 'SearchEngineFactory' );
+ public function getDBLoadBalancer() {
+ return $this->getService( 'DBLoadBalancer' );
}
/**
- * @since 1.27
- * @return SearchEngineConfig
+ * @since 1.28
+ * @return LBFactory
*/
- public function getSearchEngineConfig() {
- return $this->getService( 'SearchEngineConfig' );
+ public function getDBLoadBalancerFactory() {
+ return $this->getService( 'DBLoadBalancerFactory' );
}
/**
* @since 1.27
- * @return SkinFactory
+ * @return EventRelayerGroup
*/
- public function getSkinFactory() {
- return $this->getService( 'SkinFactory' );
+ public function getEventRelayerGroup() {
+ return $this->getService( 'EventRelayerGroup' );
}
/**
- * @since 1.28
- * @return LBFactory
+ * @since 1.31
+ * @return \ExternalStoreFactory
*/
- public function getDBLoadBalancerFactory() {
- return $this->getService( 'DBLoadBalancerFactory' );
+ public function getExternalStoreFactory() {
+ return $this->getService( 'ExternalStoreFactory' );
}
/**
* @since 1.28
- * @return LoadBalancer The main DB load balancer for the local wiki.
+ * @return GenderCache
*/
- public function getDBLoadBalancer() {
- return $this->getService( 'DBLoadBalancer' );
+ public function getGenderCache() {
+ return $this->getService( 'GenderCache' );
}
/**
- * @since 1.28
- * @return WatchedItemStoreInterface
+ * @since 1.31
+ * @return HttpRequestFactory
*/
- public function getWatchedItemStore() {
- return $this->getService( 'WatchedItemStore' );
+ public function getHttpRequestFactory() {
+ return $this->getService( 'HttpRequestFactory' );
}
/**
* @since 1.28
- * @return WatchedItemQueryService
+ * @return InterwikiLookup
*/
- public function getWatchedItemQueryService() {
- return $this->getService( 'WatchedItemQueryService' );
+ public function getInterwikiLookup() {
+ return $this->getService( 'InterwikiLookup' );
}
/**
* @since 1.28
- * @deprecated since 1.32, use random_bytes()/random_int()
- * @return CryptRand
+ * @return LinkCache
*/
- public function getCryptRand() {
- return $this->getService( 'CryptRand' );
+ public function getLinkCache() {
+ return $this->getService( 'LinkCache' );
}
/**
+ * LinkRenderer instance that can be used
+ * if no custom options are needed
+ *
* @since 1.28
- * @return CryptHKDF
+ * @return LinkRenderer
*/
- public function getCryptHKDF() {
- return $this->getService( 'CryptHKDF' );
+ public function getLinkRenderer() {
+ return $this->getService( 'LinkRenderer' );
}
/**
* @since 1.28
- * @return MediaHandlerFactory
+ * @return LinkRendererFactory
*/
- public function getMediaHandlerFactory() {
- return $this->getService( 'MediaHandlerFactory' );
+ public function getLinkRendererFactory() {
+ return $this->getService( 'LinkRendererFactory' );
}
/**
* @since 1.28
- * @return MimeAnalyzer
+ * @return \BagOStuff
*/
- public function getMimeAnalyzer() {
- return $this->getService( 'MimeAnalyzer' );
+ public function getLocalServerObjectCache() {
+ return $this->getService( 'LocalServerObjectCache' );
}
/**
- * @since 1.28
- * @return ProxyLookup
+ * @since 1.32
+ * @return MagicWordFactory
*/
- public function getProxyLookup() {
- return $this->getService( 'ProxyLookup' );
+ public function getMagicWordFactory() {
+ return $this->getService( 'MagicWordFactory' );
}
/**
- * @since 1.29
- * @return Parser
+ * Returns the Config object that provides configuration for MediaWiki core.
+ * This may or may not be the same object that is returned by getBootstrapConfig().
+ *
+ * @since 1.27
+ * @return Config
*/
- public function getParser() {
- return $this->getService( 'Parser' );
+ public function getMainConfig() {
+ return $this->getService( 'MainConfig' );
}
/**
- * @since 1.30
- * @return ParserCache
+ * @since 1.28
+ * @return \BagOStuff
*/
- public function getParserCache() {
- return $this->getService( 'ParserCache' );
+ public function getMainObjectStash() {
+ return $this->getService( 'MainObjectStash' );
}
/**
* @since 1.28
- * @return GenderCache
+ * @return \WANObjectCache
*/
- public function getGenderCache() {
- return $this->getService( 'GenderCache' );
+ public function getMainWANObjectCache() {
+ return $this->getService( 'MainWANObjectCache' );
}
/**
* @since 1.28
- * @return LinkCache
+ * @return MediaHandlerFactory
*/
- public function getLinkCache() {
- return $this->getService( 'LinkCache' );
+ public function getMediaHandlerFactory() {
+ return $this->getService( 'MediaHandlerFactory' );
}
/**
* @since 1.28
- * @return LinkRendererFactory
+ * @return MimeAnalyzer
*/
- public function getLinkRendererFactory() {
- return $this->getService( 'LinkRendererFactory' );
+ public function getMimeAnalyzer() {
+ return $this->getService( 'MimeAnalyzer' );
}
/**
- * LinkRenderer instance that can be used
- * if no custom options are needed
- *
- * @since 1.28
- * @return LinkRenderer
+ * @since 1.32
+ * @return OldRevisionImporter
*/
- public function getLinkRenderer() {
- return $this->getService( 'LinkRenderer' );
+ public function getOldRevisionImporter() {
+ return $this->getService( 'OldRevisionImporter' );
}
/**
- * @since 1.28
- * @return TitleFormatter
+ * @since 1.29
+ * @return Parser
*/
- public function getTitleFormatter() {
- return $this->getService( 'TitleFormatter' );
+ public function getParser() {
+ return $this->getService( 'Parser' );
}
/**
- * @since 1.28
- * @return TitleParser
+ * @since 1.30
+ * @return ParserCache
*/
- public function getTitleParser() {
- return $this->getService( 'TitleParser' );
+ public function getParserCache() {
+ return $this->getService( 'ParserCache' );
}
/**
- * @since 1.28
- * @return \BagOStuff
+ * @since 1.32
+ * @return ParserFactory
*/
- public function getMainObjectStash() {
- return $this->getService( 'MainObjectStash' );
+ public function getParserFactory() {
+ return $this->getService( 'ParserFactory' );
}
/**
- * @since 1.28
- * @return \WANObjectCache
+ * @since 1.32
+ * @return PasswordFactory
*/
- public function getMainWANObjectCache() {
- return $this->getService( 'MainWANObjectCache' );
+ public function getPasswordFactory() {
+ return $this->getService( 'PasswordFactory' );
}
/**
- * @since 1.28
- * @return \BagOStuff
+ * @since 1.32
+ * @return IBufferingStatsdDataFactory
*/
- public function getLocalServerObjectCache() {
- return $this->getService( 'LocalServerObjectCache' );
+ public function getPerDbNameStatsdDataFactory() {
+ return $this->getService( 'PerDbNameStatsdDataFactory' );
}
/**
- * @since 1.28
- * @return VirtualRESTServiceClient
+ * @since 1.31
+ * @return PreferencesFactory
*/
- public function getVirtualRESTServiceClient() {
- return $this->getService( 'VirtualRESTServiceClient' );
+ public function getPreferencesFactory() {
+ return $this->getService( 'PreferencesFactory' );
}
/**
- * @since 1.29
- * @return \ConfiguredReadOnlyMode
+ * @since 1.28
+ * @return ProxyLookup
*/
- public function getConfiguredReadOnlyMode() {
- return $this->getService( 'ConfiguredReadOnlyMode' );
+ public function getProxyLookup() {
+ return $this->getService( 'ProxyLookup' );
}
/**
/**
* @since 1.31
- * @return \UploadRevisionImporter
+ * @return RevisionFactory
*/
- public function getWikiRevisionUploadImporter() {
- return $this->getService( 'UploadRevisionImporter' );
+ public function getRevisionFactory() {
+ return $this->getService( 'RevisionFactory' );
}
/**
* @since 1.31
- * @return \OldRevisionImporter
+ * @return RevisionLookup
*/
- public function getWikiRevisionOldRevisionImporter() {
- return $this->getService( 'OldRevisionImporter' );
+ public function getRevisionLookup() {
+ return $this->getService( 'RevisionLookup' );
}
/**
* @since 1.31
- * @return \OldRevisionImporter
+ * @return RevisionStore
*/
- public function getWikiRevisionOldRevisionImporterNoUpdates() {
- return $this->getService( 'WikiRevisionOldRevisionImporterNoUpdates' );
+ public function getRevisionStore() {
+ return $this->getService( 'RevisionStore' );
}
/**
- * @since 1.30
- * @return CommandFactory
+ * @since 1.32
+ * @return RevisionStoreFactory
*/
- public function getShellCommandFactory() {
- return $this->getService( 'ShellCommandFactory' );
+ public function getRevisionStoreFactory() {
+ return $this->getService( 'RevisionStoreFactory' );
}
/**
- * @since 1.31
- * @return \ExternalStoreFactory
+ * @since 1.27
+ * @return SearchEngine
*/
- public function getExternalStoreFactory() {
- return $this->getService( 'ExternalStoreFactory' );
+ public function newSearchEngine() {
+ // New engine object every time, since they keep state
+ return $this->getService( 'SearchEngineFactory' )->create();
}
/**
- * @since 1.31
- * @return BlobStoreFactory
+ * @since 1.27
+ * @return SearchEngineConfig
*/
- public function getBlobStoreFactory() {
- return $this->getService( 'BlobStoreFactory' );
+ public function getSearchEngineConfig() {
+ return $this->getService( 'SearchEngineConfig' );
}
/**
- * @since 1.31
- * @return BlobStore
+ * @since 1.27
+ * @return SearchEngineFactory
*/
- public function getBlobStore() {
- return $this->getService( '_SqlBlobStore' );
+ public function getSearchEngineFactory() {
+ return $this->getService( 'SearchEngineFactory' );
}
/**
- * @since 1.31
- * @return RevisionStore
+ * @since 1.30
+ * @return CommandFactory
*/
- public function getRevisionStore() {
- return $this->getService( 'RevisionStore' );
+ public function getShellCommandFactory() {
+ return $this->getService( 'ShellCommandFactory' );
}
/**
- * @since 1.31
- * @return RevisionLookup
+ * @since 1.27
+ * @return SiteLookup
*/
- public function getRevisionLookup() {
- return $this->getService( 'RevisionLookup' );
+ public function getSiteLookup() {
+ return $this->getService( 'SiteLookup' );
}
/**
- * @since 1.31
- * @return RevisionFactory
+ * @since 1.27
+ * @return SiteStore
*/
- public function getRevisionFactory() {
- return $this->getService( 'RevisionFactory' );
+ public function getSiteStore() {
+ return $this->getService( 'SiteStore' );
}
/**
- * @since 1.31
- * @return NameTableStore
+ * @since 1.27
+ * @return SkinFactory
*/
- public function getContentModelStore() {
- return $this->getService( 'ContentModelStore' );
+ public function getSkinFactory() {
+ return $this->getService( 'SkinFactory' );
}
/**
}
/**
- * @since 1.32
- * @return NameTableStore
+ * @since 1.27
+ * @return IBufferingStatsdDataFactory
*/
- public function getChangeTagDefStore() {
- return $this->getService( 'ChangeTagDefStore' );
+ public function getStatsdDataFactory() {
+ return $this->getService( 'StatsdDataFactory' );
}
/**
- * @since 1.31
- * @return PreferencesFactory
+ * @since 1.28
+ * @return TitleFormatter
*/
- public function getPreferencesFactory() {
- return $this->getService( 'PreferencesFactory' );
+ public function getTitleFormatter() {
+ return $this->getService( 'TitleFormatter' );
}
/**
- * @since 1.31
- * @return HttpRequestFactory
+ * @since 1.28
+ * @return TitleParser
*/
- public function getHttpRequestFactory() {
- return $this->getService( 'HttpRequestFactory' );
+ public function getTitleParser() {
+ return $this->getService( 'TitleParser' );
}
/**
- * @since 1.31
- * @return CommentStore
+ * @since 1.32
+ * @return UploadRevisionImporter
*/
- public function getCommentStore() {
- return $this->getService( 'CommentStore' );
+ public function getUploadRevisionImporter() {
+ return $this->getService( 'UploadRevisionImporter' );
}
/**
- * @since 1.31
- * @return ActorMigration
+ * @since 1.28
+ * @return VirtualRESTServiceClient
*/
- public function getActorMigration() {
- return $this->getService( 'ActorMigration' );
+ public function getVirtualRESTServiceClient() {
+ return $this->getService( 'VirtualRESTServiceClient' );
}
/**
- * @since 1.32
- * @return UploadRevisionImporter
+ * @since 1.28
+ * @return WatchedItemQueryService
*/
- public function getUploadRevisionImporter() {
- return $this->getService( 'UploadRevisionImporter' );
+ public function getWatchedItemQueryService() {
+ return $this->getService( 'WatchedItemQueryService' );
}
/**
- * @since 1.32
- * @return OldRevisionImporter
+ * @since 1.28
+ * @return WatchedItemStoreInterface
*/
- public function getOldRevisionImporter() {
+ public function getWatchedItemStore() {
+ return $this->getService( 'WatchedItemStore' );
+ }
+
+ /**
+ * @since 1.31
+ * @return \OldRevisionImporter
+ */
+ public function getWikiRevisionOldRevisionImporter() {
return $this->getService( 'OldRevisionImporter' );
}
/**
- * @since 1.32
- * @return ConfigRepository
+ * @since 1.31
+ * @return \OldRevisionImporter
*/
- public function getConfigRepository() {
- return $this->getService( 'ConfigRepository' );
+ public function getWikiRevisionOldRevisionImporterNoUpdates() {
+ return $this->getService( 'WikiRevisionOldRevisionImporterNoUpdates' );
}
- ///////////////////////////////////////////////////////////////////////////
- // NOTE: When adding a service getter here, don't forget to add a test
- // case for it in MediaWikiServicesTest::provideGetters() and in
- // MediaWikiServicesTest::provideGetService()!
- ///////////////////////////////////////////////////////////////////////////
+ /**
+ * @since 1.31
+ * @return \UploadRevisionImporter
+ */
+ public function getWikiRevisionUploadImporter() {
+ return $this->getService( 'UploadRevisionImporter' );
+ }
}