10 use DateFormatterFactory
;
11 use EventRelayerGroup
;
15 use IBufferingStatsdDataFactory
;
16 use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface
;
17 use LocalisationCache
;
18 use MediaWiki\Block\BlockManager
;
19 use MediaWiki\Block\BlockRestrictionStore
;
20 use MediaWiki\FileBackend\FSFile\TempFSFileFactory
;
21 use MediaWiki\FileBackend\LockManager\LockManagerGroupFactory
;
22 use MediaWiki\Http\HttpRequestFactory
;
24 use Wikimedia\Message\IMessageFormatterFactory
;
25 use MediaWiki\Page\MovePageFactory
;
26 use MediaWiki\Permissions\PermissionManager
;
27 use MediaWiki\Preferences\PreferencesFactory
;
28 use MediaWiki\Revision\RevisionRenderer
;
29 use MediaWiki\Revision\SlotRoleRegistry
;
30 use MediaWiki\Shell\CommandFactory
;
31 use MediaWiki\Special\SpecialPageFactory
;
32 use MediaWiki\Storage\BlobStore
;
33 use MediaWiki\Storage\BlobStoreFactory
;
34 use MediaWiki\Storage\NameTableStore
;
35 use MediaWiki\Storage\NameTableStoreFactory
;
36 use MediaWiki\Revision\RevisionFactory
;
37 use MediaWiki\Revision\RevisionLookup
;
38 use MediaWiki\Revision\RevisionStore
;
39 use OldRevisionImporter
;
40 use MediaWiki\Revision\RevisionStoreFactory
;
41 use UploadRevisionImporter
;
42 use Wikimedia\Rdbms\ILoadBalancer
;
44 use MediaHandlerFactory
;
45 use MediaWiki\Config\ConfigRepository
;
46 use MediaWiki\Linker\LinkRenderer
;
47 use MediaWiki\Linker\LinkRendererFactory
;
61 use SearchEngineConfig
;
62 use SearchEngineFactory
;
65 use WatchedItemStoreInterface
;
66 use WatchedItemQueryService
;
70 use VirtualRESTServiceClient
;
71 use Wikimedia\ObjectFactory
;
72 use Wikimedia\Rdbms\LBFactory
;
73 use Wikimedia\Services\SalvageableService
;
74 use Wikimedia\Services\ServiceContainer
;
75 use Wikimedia\Services\NoSuchServiceException
;
76 use MediaWiki\Interwiki\InterwikiLookup
;
78 use MediaWiki\Storage\PageEditStash
;
81 * Service locator for MediaWiki core services.
83 * This program is free software; you can redistribute it and/or modify
84 * it under the terms of the GNU General Public License as published by
85 * the Free Software Foundation; either version 2 of the License, or
86 * (at your option) any later version.
88 * This program is distributed in the hope that it will be useful,
89 * but WITHOUT ANY WARRANTY; without even the implied warranty of
90 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
91 * GNU General Public License for more details.
93 * You should have received a copy of the GNU General Public License along
94 * with this program; if not, write to the Free Software Foundation, Inc.,
95 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
96 * http://www.gnu.org/copyleft/gpl.html
104 * MediaWikiServices is the service locator for the application scope of MediaWiki.
105 * Its implemented as a simple configurable DI container.
106 * MediaWikiServices acts as a top level factory/registry for top level services, and builds
107 * the network of service objects that defines MediaWiki's application logic.
108 * It acts as an entry point to MediaWiki's dependency injection mechanism.
110 * Services are defined in the "wiring" array passed to the constructor,
111 * or by calling defineService().
113 * @see docs/injection.txt for an overview of using dependency injection in the
114 * MediaWiki code base.
116 class MediaWikiServices
extends ServiceContainer
{
119 * @var MediaWikiServices|null
121 private static $instance = null;
124 * Returns the global default instance of the top level service locator.
128 * The default instance is initialized using the service instantiator functions
129 * defined in ServiceWiring.php.
131 * @note This should only be called by static functions! The instance returned here
132 * should not be passed around! Objects that need access to a service should have
133 * that service injected into the constructor, never a service locator!
135 * @return MediaWikiServices
137 public static function getInstance() {
138 if ( self
::$instance === null ) {
139 // NOTE: constructing GlobalVarConfig here is not particularly pretty,
140 // but some information from the global scope has to be injected here,
141 // even if it's just a file name or database credentials to load
142 // configuration from.
143 $bootstrapConfig = new GlobalVarConfig();
144 self
::$instance = self
::newInstance( $bootstrapConfig, 'load' );
147 return self
::$instance;
151 * Replaces the global MediaWikiServices instance.
155 * @note This is for use in PHPUnit tests only!
157 * @throws MWException if called outside of PHPUnit tests.
159 * @param MediaWikiServices $services The new MediaWikiServices object.
161 * @return MediaWikiServices The old MediaWikiServices object, so it can be restored later.
163 public static function forceGlobalInstance( MediaWikiServices
$services ) {
164 if ( !defined( 'MW_PHPUNIT_TEST' ) ) {
165 throw new MWException( __METHOD__
. ' must not be used outside unit tests.' );
168 $old = self
::getInstance();
169 self
::$instance = $services;
175 * Creates a new instance of MediaWikiServices and sets it as the global default
176 * instance. getInstance() will return a different MediaWikiServices object
177 * after every call to resetGlobalInstance().
181 * @warning This should not be used during normal operation. It is intended for use
182 * when the configuration has changed significantly since bootstrap time, e.g.
183 * during the installation process or during testing.
185 * @warning Calling resetGlobalInstance() may leave the application in an inconsistent
186 * state. Calling this is only safe under the ASSUMPTION that NO REFERENCE to
187 * any of the services managed by MediaWikiServices exist. If any service objects
188 * managed by the old MediaWikiServices instance remain in use, they may INTERFERE
189 * with the operation of the services managed by the new MediaWikiServices.
190 * Operating with a mix of services created by the old and the new
191 * MediaWikiServices instance may lead to INCONSISTENCIES and even DATA LOSS!
192 * Any class implementing LAZY LOADING is especially prone to this problem,
193 * since instances would typically retain a reference to a storage layer service.
195 * @see forceGlobalInstance()
196 * @see resetGlobalInstance()
197 * @see resetBetweenTest()
199 * @param Config|null $bootstrapConfig The Config object to be registered as the
200 * 'BootstrapConfig' service. This has to contain at least the information
201 * needed to set up the 'ConfigFactory' service. If not given, the bootstrap
202 * config of the old instance of MediaWikiServices will be re-used. If there
203 * was no previous instance, a new GlobalVarConfig object will be used to
204 * bootstrap the services.
206 * @param string $quick Set this to "quick" to allow expensive resources to be re-used.
207 * See SalvageableService for details.
209 * @throws MWException If called after MW_SERVICE_BOOTSTRAP_COMPLETE has been defined in
210 * Setup.php (unless MW_PHPUNIT_TEST or MEDIAWIKI_INSTALL or RUN_MAINTENANCE_IF_MAIN
213 public static function resetGlobalInstance( Config
$bootstrapConfig = null, $quick = '' ) {
214 if ( self
::$instance === null ) {
215 // no global instance yet, nothing to reset
219 self
::failIfResetNotAllowed( __METHOD__
);
221 if ( $bootstrapConfig === null ) {
222 $bootstrapConfig = self
::$instance->getBootstrapConfig();
225 $oldInstance = self
::$instance;
227 self
::$instance = self
::newInstance( $bootstrapConfig, 'load' );
228 self
::$instance->importWiring( $oldInstance, [ 'BootstrapConfig' ] );
230 if ( $quick === 'quick' ) {
231 self
::$instance->salvage( $oldInstance );
233 $oldInstance->destroy();
237 /** @noinspection PhpDocSignatureInspection */
240 * Salvages the state of any salvageable service instances in $other.
242 * @note $other will have been destroyed when salvage() returns.
244 * @param MediaWikiServices $other
246 private function salvage( self
$other ) {
247 foreach ( $this->getServiceNames() as $name ) {
248 // The service could be new in the new instance and not registered in the
249 // other instance (e.g. an extension that was loaded after the instantiation of
250 // the other instance. Skip this service in this case. See T143974
252 $oldService = $other->peekService( $name );
253 } catch ( NoSuchServiceException
$e ) {
257 if ( $oldService instanceof SalvageableService
) {
258 /** @var SalvageableService $newService */
259 $newService = $this->getService( $name );
260 $newService->salvage( $oldService );
268 * Creates a new MediaWikiServices instance and initializes it according to the
269 * given $bootstrapConfig. In particular, all wiring files defined in the
270 * ServiceWiringFiles setting are loaded, and the MediaWikiServices hook is called.
272 * @param Config|null $bootstrapConfig The Config object to be registered as the
273 * 'BootstrapConfig' service.
275 * @param string $loadWiring set this to 'load' to load the wiring files specified
276 * in the 'ServiceWiringFiles' setting in $bootstrapConfig.
278 * @return MediaWikiServices
279 * @throws MWException
280 * @throws \FatalError
282 private static function newInstance( Config
$bootstrapConfig, $loadWiring = '' ) {
283 $instance = new self( $bootstrapConfig );
285 // Load the default wiring from the specified files.
286 if ( $loadWiring === 'load' ) {
287 $wiringFiles = $bootstrapConfig->get( 'ServiceWiringFiles' );
288 $instance->loadWiringFiles( $wiringFiles );
291 // Provide a traditional hook point to allow extensions to configure services.
292 Hooks
::run( 'MediaWikiServices', [ $instance ] );
298 * Disables all storage layer services. After calling this, any attempt to access the
299 * storage layer will result in an error. Use resetGlobalInstance() to restore normal
304 * @warning This is intended for extreme situations only and should never be used
305 * while serving normal web requests. Legitimate use cases for this method include
306 * the installation process. Test fixtures may also use this, if the fixture relies
309 * @see resetGlobalInstance()
310 * @see resetChildProcessServices()
312 public static function disableStorageBackend() {
313 // TODO: also disable some Caches, JobQueues, etc
314 $destroy = [ 'DBLoadBalancer', 'DBLoadBalancerFactory' ];
315 $services = self
::getInstance();
317 foreach ( $destroy as $name ) {
318 $services->disableService( $name );
321 ObjectCache
::clear();
325 * Resets any services that may have become stale after a child process
326 * returns from after pcntl_fork(). It's also safe, but generally unnecessary,
327 * to call this method from the parent process.
331 * @note This is intended for use in the context of process forking only!
333 * @see resetGlobalInstance()
334 * @see disableStorageBackend()
336 public static function resetChildProcessServices() {
337 // NOTE: for now, just reset everything. Since we don't know the interdependencies
338 // between services, we can't do this more selectively at this time.
339 self
::resetGlobalInstance();
341 // Child, reseed because there is no bug in PHP:
342 // https://bugs.php.net/bug.php?id=42465
343 mt_srand( getmypid() );
347 * Resets the given service for testing purposes.
351 * @warning This is generally unsafe! Other services may still retain references
352 * to the stale service instance, leading to failures and inconsistencies. Subclasses
353 * may use this method to reset specific services under specific instances, but
354 * it should not be exposed to application logic.
356 * @note With proper dependency injection used throughout the codebase, this method
357 * should not be needed. It is provided to allow tests that pollute global service
358 * instances to clean up.
360 * @param string $name
361 * @param bool $destroy Whether the service instance should be destroyed if it exists.
362 * When set to false, any existing service instance will effectively be detached
363 * from the container.
365 * @throws MWException if called outside of PHPUnit tests.
367 public function resetServiceForTesting( $name, $destroy = true ) {
368 if ( !defined( 'MW_PHPUNIT_TEST' ) && !defined( 'MW_PARSER_TEST' ) ) {
369 throw new MWException( 'resetServiceForTesting() must not be used outside unit tests.' );
372 $this->resetService( $name, $destroy );
376 * Convenience method that throws an exception unless it is called during a phase in which
377 * resetting of global services is allowed. In general, services should not be reset
378 * individually, since that may introduce inconsistencies.
382 * This method will throw an exception if:
384 * - self::$resetInProgress is false (to allow all services to be reset together
385 * via resetGlobalInstance)
386 * - and MEDIAWIKI_INSTALL is not defined (to allow services to be reset during installation)
387 * - and MW_PHPUNIT_TEST is not defined (to allow services to be reset during testing)
389 * This method is intended to be used to safeguard against accidentally resetting
390 * global service instances that are not yet managed by MediaWikiServices. It is
391 * defined here in the MediaWikiServices services class to have a central place
392 * for managing service bootstrapping and resetting.
394 * @param string $method the name of the caller method, as given by __METHOD__.
396 * @throws MWException if called outside bootstrap mode.
398 * @see resetGlobalInstance()
399 * @see forceGlobalInstance()
400 * @see disableStorageBackend()
402 public static function failIfResetNotAllowed( $method ) {
403 if ( !defined( 'MW_PHPUNIT_TEST' )
404 && !defined( 'MW_PARSER_TEST' )
405 && !defined( 'MEDIAWIKI_INSTALL' )
406 && !defined( 'RUN_MAINTENANCE_IF_MAIN' )
407 && defined( 'MW_SERVICE_BOOTSTRAP_COMPLETE' )
409 throw new MWException( $method . ' may only be called during bootstrapping and unit tests!' );
414 * @param Config $config The Config object to be registered as the 'BootstrapConfig' service.
415 * This has to contain at least the information needed to set up the 'ConfigFactory'
418 public function __construct( Config
$config ) {
419 parent
::__construct();
421 // Register the given Config object as the bootstrap config service.
422 $this->defineService( 'BootstrapConfig', function () use ( $config ) {
427 // CONVENIENCE GETTERS ////////////////////////////////////////////////////
431 * @return ActorMigration
433 public function getActorMigration() {
434 return $this->getService( 'ActorMigration' );
439 * @return BadFileLookup
441 public function getBadFileLookup() : BadFileLookup
{
442 return $this->getService( 'BadFileLookup' );
449 public function getBlobStore() {
450 return $this->getService( '_SqlBlobStore' );
455 * @return BlobStoreFactory
457 public function getBlobStoreFactory() {
458 return $this->getService( 'BlobStoreFactory' );
463 * @return BlockManager
465 public function getBlockManager() : BlockManager
{
466 return $this->getService( 'BlockManager' );
471 * @return BlockRestrictionStore
473 public function getBlockRestrictionStore() : BlockRestrictionStore
{
474 return $this->getService( 'BlockRestrictionStore' );
478 * Returns the Config object containing the bootstrap configuration.
479 * Bootstrap configuration would typically include database credentials
480 * and other information that may be needed before the ConfigFactory
481 * service can be instantiated.
483 * @note This should only be used during bootstrapping, in particular
484 * when creating the MainConfig service. Application logic should
485 * use getMainConfig() to get a Config instances.
490 public function getBootstrapConfig() {
491 return $this->getService( 'BootstrapConfig' );
496 * @return NameTableStore
498 public function getChangeTagDefStore() {
499 return $this->getService( 'NameTableStoreFactory' )->getChangeTagDef();
504 * @return CommentStore
506 public function getCommentStore() {
507 return $this->getService( 'CommentStore' );
512 * @return ConfigFactory
514 public function getConfigFactory() {
515 return $this->getService( 'ConfigFactory' );
520 * @return ConfigRepository
522 public function getConfigRepository() {
523 return $this->getService( 'ConfigRepository' );
528 * @return \ConfiguredReadOnlyMode
530 public function getConfiguredReadOnlyMode() {
531 return $this->getService( 'ConfiguredReadOnlyMode' );
538 public function getContentLanguage() {
539 return $this->getService( 'ContentLanguage' );
544 * @return NameTableStore
546 public function getContentModelStore() {
547 return $this->getService( 'NameTableStoreFactory' )->getContentModels();
554 public function getCryptHKDF() {
555 return $this->getService( 'CryptHKDF' );
560 * @return DateFormatterFactory
562 public function getDateFormatterFactory() {
563 return $this->getService( 'DateFormatterFactory' );
568 * @return ILoadBalancer The main DB load balancer for the local wiki.
570 public function getDBLoadBalancer() {
571 return $this->getService( 'DBLoadBalancer' );
578 public function getDBLoadBalancerFactory() {
579 return $this->getService( 'DBLoadBalancerFactory' );
584 * @return EventRelayerGroup
586 public function getEventRelayerGroup() {
587 return $this->getService( 'EventRelayerGroup' );
592 * @return \ExternalStoreAccess
594 public function getExternalStoreAccess() {
595 return $this->getService( 'ExternalStoreAccess' );
600 * @return \ExternalStoreFactory
602 public function getExternalStoreFactory() {
603 return $this->getService( 'ExternalStoreFactory' );
608 * @return GenderCache
610 public function getGenderCache() {
611 return $this->getService( 'GenderCache' );
616 * @return HttpRequestFactory
618 public function getHttpRequestFactory() {
619 return $this->getService( 'HttpRequestFactory' );
624 * @return InterwikiLookup
626 public function getInterwikiLookup() {
627 return $this->getService( 'InterwikiLookup' );
634 public function getLinkCache() {
635 return $this->getService( 'LinkCache' );
639 * LinkRenderer instance that can be used
640 * if no custom options are needed
643 * @return LinkRenderer
645 public function getLinkRenderer() {
646 return $this->getService( 'LinkRenderer' );
651 * @return LinkRendererFactory
653 public function getLinkRendererFactory() {
654 return $this->getService( 'LinkRendererFactory' );
659 * @return LocalisationCache
661 public function getLocalisationCache() : LocalisationCache
{
662 return $this->getService( 'LocalisationCache' );
669 public function getLocalServerObjectCache() {
670 return $this->getService( 'LocalServerObjectCache' );
675 * @return LockManagerGroupFactory
677 public function getLockManagerGroupFactory() : LockManagerGroupFactory
{
678 return $this->getService( 'LockManagerGroupFactory' );
683 * @return MagicWordFactory
685 public function getMagicWordFactory() {
686 return $this->getService( 'MagicWordFactory' );
690 * Returns the Config object that provides configuration for MediaWiki core.
691 * This may or may not be the same object that is returned by getBootstrapConfig().
696 public function getMainConfig() {
697 return $this->getService( 'MainConfig' );
704 public function getMainObjectStash() {
705 return $this->getService( 'MainObjectStash' );
710 * @return \WANObjectCache
712 public function getMainWANObjectCache() {
713 return $this->getService( 'MainWANObjectCache' );
718 * @return MediaHandlerFactory
720 public function getMediaHandlerFactory() {
721 return $this->getService( 'MediaHandlerFactory' );
726 * @return MessageCache
728 public function getMessageCache() : MessageCache
{
729 return $this->getService( 'MessageCache' );
734 * @return IMessageFormatterFactory
736 public function getMessageFormatterFactory() {
737 return $this->getService( 'MessageFormatterFactory' );
742 * @return MimeAnalyzer
744 public function getMimeAnalyzer() {
745 return $this->getService( 'MimeAnalyzer' );
750 * @return MovePageFactory
752 public function getMovePageFactory() : MovePageFactory
{
753 return $this->getService( 'MovePageFactory' );
758 * @return NamespaceInfo
760 public function getNamespaceInfo() : NamespaceInfo
{
761 return $this->getService( 'NamespaceInfo' );
766 * @return NameTableStoreFactory
768 public function getNameTableStoreFactory() {
769 return $this->getService( 'NameTableStoreFactory' );
773 * ObjectFactory is intended for instantiating "handlers" from declarative definitions,
774 * such as Action API modules, special pages, or REST API handlers.
777 * @return ObjectFactory
779 public function getObjectFactory() {
780 return $this->getService( 'ObjectFactory' );
785 * @return OldRevisionImporter
787 public function getOldRevisionImporter() {
788 return $this->getService( 'OldRevisionImporter' );
792 * @return PageEditStash
795 public function getPageEditStash() {
796 return $this->getService( 'PageEditStash' );
803 public function getParser() {
804 return $this->getService( 'Parser' );
809 * @return ParserCache
811 public function getParserCache() {
812 return $this->getService( 'ParserCache' );
817 * @return ParserFactory
819 public function getParserFactory() {
820 return $this->getService( 'ParserFactory' );
825 * @return PasswordFactory
827 public function getPasswordFactory() {
828 return $this->getService( 'PasswordFactory' );
833 * @return PasswordReset
835 public function getPasswordReset() : PasswordReset
{
836 return $this->getService( 'PasswordReset' );
841 * @return StatsdDataFactoryInterface
843 public function getPerDbNameStatsdDataFactory() {
844 return $this->getService( 'PerDbNameStatsdDataFactory' );
849 * @return PermissionManager
851 public function getPermissionManager() {
852 return $this->getService( 'PermissionManager' );
857 * @return PreferencesFactory
859 public function getPreferencesFactory() {
860 return $this->getService( 'PreferencesFactory' );
865 * @return ProxyLookup
867 public function getProxyLookup() {
868 return $this->getService( 'ProxyLookup' );
873 * @return \ReadOnlyMode
875 public function getReadOnlyMode() {
876 return $this->getService( 'ReadOnlyMode' );
883 public function getRepoGroup() : RepoGroup
{
884 return $this->getService( 'RepoGroup' );
889 * @return ResourceLoader
891 public function getResourceLoader() {
892 return $this->getService( 'ResourceLoader' );
897 * @return RevisionFactory
899 public function getRevisionFactory() {
900 return $this->getService( 'RevisionFactory' );
905 * @return RevisionLookup
907 public function getRevisionLookup() {
908 return $this->getService( 'RevisionLookup' );
913 * @return RevisionRenderer
915 public function getRevisionRenderer() {
916 return $this->getService( 'RevisionRenderer' );
921 * @return RevisionStore
923 public function getRevisionStore() {
924 return $this->getService( 'RevisionStore' );
929 * @return RevisionStoreFactory
931 public function getRevisionStoreFactory() {
932 return $this->getService( 'RevisionStoreFactory' );
937 * @return SearchEngine
939 public function newSearchEngine() {
940 // New engine object every time, since they keep state
941 return $this->getService( 'SearchEngineFactory' )->create();
946 * @return SearchEngineConfig
948 public function getSearchEngineConfig() {
949 return $this->getService( 'SearchEngineConfig' );
954 * @return SearchEngineFactory
956 public function getSearchEngineFactory() {
957 return $this->getService( 'SearchEngineFactory' );
962 * @return CommandFactory
964 public function getShellCommandFactory() {
965 return $this->getService( 'ShellCommandFactory' );
972 public function getSiteLookup() {
973 return $this->getService( 'SiteLookup' );
980 public function getSiteStore() {
981 return $this->getService( 'SiteStore' );
986 * @return SkinFactory
988 public function getSkinFactory() {
989 return $this->getService( 'SkinFactory' );
994 * @return SlotRoleRegistry
996 public function getSlotRoleRegistry() {
997 return $this->getService( 'SlotRoleRegistry' );
1002 * @return NameTableStore
1004 public function getSlotRoleStore() {
1005 return $this->getService( 'NameTableStoreFactory' )->getSlotRoles();
1010 * @return SpecialPageFactory
1012 public function getSpecialPageFactory() : SpecialPageFactory
{
1013 return $this->getService( 'SpecialPageFactory' );
1018 * @return IBufferingStatsdDataFactory
1020 public function getStatsdDataFactory() {
1021 return $this->getService( 'StatsdDataFactory' );
1026 * @return TempFSFileFactory
1028 public function getTempFSFileFactory() : TempFSFileFactory
{
1029 return $this->getService( 'TempFSFileFactory' );
1034 * @return TitleFormatter
1036 public function getTitleFormatter() {
1037 return $this->getService( 'TitleFormatter' );
1042 * @return TitleParser
1044 public function getTitleParser() {
1045 return $this->getService( 'TitleParser' );
1050 * @return UploadRevisionImporter
1052 public function getUploadRevisionImporter() {
1053 return $this->getService( 'UploadRevisionImporter' );
1058 * @return VirtualRESTServiceClient
1060 public function getVirtualRESTServiceClient() {
1061 return $this->getService( 'VirtualRESTServiceClient' );
1066 * @return WatchedItemQueryService
1068 public function getWatchedItemQueryService() {
1069 return $this->getService( 'WatchedItemQueryService' );
1074 * @return WatchedItemStoreInterface
1076 public function getWatchedItemStore() {
1077 return $this->getService( 'WatchedItemStore' );
1082 * @return \OldRevisionImporter
1084 public function getWikiRevisionOldRevisionImporter() {
1085 return $this->getService( 'OldRevisionImporter' );
1090 * @return \OldRevisionImporter
1092 public function getWikiRevisionOldRevisionImporterNoUpdates() {
1093 return $this->getService( 'WikiRevisionOldRevisionImporterNoUpdates' );
1098 * @return \UploadRevisionImporter
1100 public function getWikiRevisionUploadImporter() {
1101 return $this->getService( 'UploadRevisionImporter' );