MediaWiki REL1_40
MediaWiki\MediaWikiServices Class Reference

Service locator for MediaWiki core services. More...

Inherits ServiceContainer.

Collaboration diagram for MediaWiki\MediaWikiServices:

Public Member Functions

 __construct (Config $config)
 
 disableStorage ()
 Disables all storage layer services.
 
 getActionFactory ()
 
 getActorMigration ()
 
 getActorNormalization ()
 
 getActorStore ()
 
 getActorStoreFactory ()
 
 getArchivedRevisionLookup ()
 
 getAuthManager ()
 
 getBacklinkCacheFactory ()
 
 getBadFileLookup ()
 
 getBlobStore ()
 
 getBlobStoreFactory ()
 
 getBlockActionInfo ()
 
 getBlockErrorFormatter ()
 
 getBlockManager ()
 
 getBlockPermissionCheckerFactory ()
 
 getBlockRestrictionStore ()
 
 getBlockRestrictionStoreFactory ()
 
 getBlockUserFactory ()
 
 getBlockUtils ()
 
 getBootstrapConfig ()
 Returns the Config object containing the bootstrap configuration.
 
 getBotPasswordStore ()
 
 getCentralIdLookup ()
 
 getCentralIdLookupFactory ()
 
 getChangeTagDefStore ()
 
 getCollationFactory ()
 
 getCommentFormatter ()
 
 getCommentStore ()
 
 getConfigFactory ()
 
 getConfigRepository ()
 
 getConfigSchema ()
 
 getConfiguredReadOnlyMode ()
 
 getContentHandlerFactory ()
 
 getContentLanguage ()
 
 getContentModelChangeFactory ()
 
 getContentModelStore ()
 
 getContentRenderer ()
 
 getContentTransformer ()
 
 getContributionsLookup ()
 
 getCriticalSectionProvider ()
 
 getCryptHKDF ()
 
 getDatabaseBlockStore ()
 
 getDatabaseBlockStoreFactory ()
 
 getDatabaseFactory ()
 
 getDateFormatterFactory ()
 
 getDBLoadBalancer ()
 
 getDBLoadBalancerFactory ()
 
 getDBLoadBalancerFactoryConfigBuilder ()
 
 getDeletePageFactory ()
 
 getEmailer ()
 
 getEventRelayerGroup ()
 
 getExternalStoreAccess ()
 
 getExternalStoreFactory ()
 
 getFileBackendGroup ()
 
 getGenderCache ()
 
 getGlobalIdGenerator ()
 
 getGrantsInfo ()
 
 getGrantsLocalization ()
 
 getGroupPermissionsLookup ()
 
 getHookContainer ()
 
 getHtmlCacheUpdater ()
 
 getHtmlTransformFactory ()
 
 getHttpRequestFactory ()
 
 getInterwikiLookup ()
 
 getJobFactory ()
 
 getJobQueueGroup ()
 
 getJobQueueGroupFactory ()
 
 getJobRunner ()
 
 getJsonCodec ()
 
 getLanguageConverterFactory ()
 
 getLanguageFactory ()
 
 getLanguageFallback ()
 
 getLanguageNameUtils ()
 
 getLinkBatchFactory ()
 
 getLinkCache ()
 
 getLinkRenderer ()
 LinkRenderer instance that can be used if no custom options are needed.
 
 getLinkRendererFactory ()
 
 getLinksMigration ()
 
 getLinkTargetLookup ()
 
 getLocalisationCache ()
 
 getLocalServerObjectCache ()
 Returns the main server-local cache, yielding EmptyBagOStuff if there is none.
 
 getLockManagerGroupFactory ()
 
 getMagicWordFactory ()
 
 getMainConfig ()
 Returns the Config object that provides configuration for MediaWiki core.
 
 getMainObjectStash ()
 Returns the main object stash, yielding EmptyBagOStuff if there is none.
 
 getMainWANObjectCache ()
 Returns the main WAN cache, yielding EmptyBagOStuff if there is none.
 
 getMediaHandlerFactory ()
 
 getMergeHistoryFactory ()
 
 getMessageCache ()
 
 getMessageFormatterFactory ()
 
 getMimeAnalyzer ()
 
 getMovePageFactory ()
 
 getNamespaceInfo ()
 
 getNameTableStoreFactory ()
 
 getObjectFactory ()
 ObjectFactory is intended for instantiating "handlers" from declarative definitions, such as Action API modules, special pages, or REST API handlers.
 
 getOldRevisionImporter ()
 
 getPageEditStash ()
 
 getPageProps ()
 
 getPageRestHelperFactory ()
 
 getPageStore ()
 
 getPageStoreFactory ()
 
 getPageUpdaterFactory ()
 
 getParser ()
 Get the main Parser instance.
 
 getParserCache ()
 
 getParserCacheFactory ()
 
 getParserFactory ()
 
 getParserOutputAccess ()
 
 getParsoidDataAccess ()
 
 getParsoidOutputAccess ()
 
 getParsoidOutputStash ()
 
 getParsoidPageConfigFactory ()
 
 getParsoidSiteConfig ()
 
 getPasswordFactory ()
 
 getPasswordReset ()
 
 getPerDbNameStatsdDataFactory ()
 
 getPermissionManager ()
 
 getPoolCounterFactory ()
 
 getPreferencesFactory ()
 
 getProxyLookup ()
 
 getRateLimiter ()
 
 getReadOnlyMode ()
 
 getRedirectLookup ()
 
 getRedirectStore ()
 
 getRepoGroup ()
 
 getResourceLoader ()
 
 getRestrictionStore ()
 
 getRevertedTagUpdateManager ()
 
 getRevisionFactory ()
 
 getRevisionLookup ()
 
 getRevisionRenderer ()
 
 getRevisionStore ()
 
 getRevisionStoreFactory ()
 
 getRollbackPageFactory ()
 
 getRowCommentFormatter ()
 
 getSearchEngineConfig ()
 
 getSearchEngineFactory ()
 
 getSearchResultThumbnailProvider ()
 
 getService ( $name)
 
 getShellboxClientFactory ()
 
 getShellCommandFactory ()
 
 getSignatureValidatorFactory ()
 
 getSiteLookup ()
 
 getSiteStore ()
 
 getSkinFactory ()
 
 getSlotRoleRegistry ()
 
 getSlotRoleStore ()
 
 getSpamChecker ()
 
 getSpecialPageFactory ()
 
 getStatsCache ()
 
 getStatsdDataFactory ()
 
 getStatsFactory ()
 
 getTalkPageNotificationManager ()
 
 getTempFSFileFactory ()
 
 getTempUserConfig ()
 
 getTempUserCreator ()
 
 getTidy ()
 
 getTitleFactory ()
 
 getTitleFormatter ()
 
 getTitleMatcher ()
 
 getTitleParser ()
 
 getTrackingCategories ()
 
 getUnblockUserFactory ()
 
 getUndeletePageFactory ()
 
 getUploadRevisionImporter ()
 
 getUrlUtils ()
 
 getUserCache ()
 
 getUserEditTracker ()
 
 getUserFactory ()
 
 getUserGroupManager ()
 
 getUserGroupManagerFactory ()
 
 getUserIdentityLookup ()
 
 getUserNamePrefixSearch ()
 
 getUserNameUtils ()
 
 getUserOptionsLookup ()
 
 getUserOptionsManager ()
 
 getVirtualRESTServiceClient ()
 
 getWatchedItemQueryService ()
 
 getWatchedItemStore ()
 
 getWatchlistManager ()
 
 getWatchlistNotificationManager ()
 
 getWikiExporterFactory ()
 
 getWikiImporterFactory ()
 
 getWikiPageFactory ()
 
 getWikiRevisionOldRevisionImporter ()
 
 getWikiRevisionOldRevisionImporterNoUpdates ()
 
 getWikiRevisionUploadImporter ()
 
 getWRStatsFactory ()
 
 isStorageDisabled ()
 Returns true if disableStorage() has been called on this MediaWikiServices instance.
 
 newSearchEngine ()
 
 resetServiceForTesting ( $name, $destroy=true)
 Resets the given service for testing purposes.
 

Static Public Member Functions

static allowGlobalInstance ()
 Allows a global service container instance to exist.
 
static disableStorageBackend ()
 Disables all storage layer services.
 
static failIfResetNotAllowed ( $method)
 Convenience method that throws an exception unless it is called during a phase in which resetting of global services is allowed.
 
static forceGlobalInstance (MediaWikiServices $services)
 Replaces the global MediaWikiServices instance.
 
static getInstance ()
 Returns the global default instance of the top level service locator.
 
static hasInstance ()
 Returns true if an instance has already been initialized.
 
static resetChildProcessServices ()
 Resets any services that may have become stale after a child processö returns from after pcntl_fork().
 
static resetGlobalInstance (Config $bootstrapConfig=null, $quick='')
 Creates a new instance of MediaWikiServices and sets it as the global default instance.
 

Detailed Description

Service locator for MediaWiki core services.

Refer to includes/ServiceWiring.php for the default implementations.

See also
Dependency Injection in docs/Injection.md for the principles of DI and how to use it MediaWiki core.
Since
1.27

Definition at line 223 of file MediaWikiServices.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\MediaWikiServices::__construct ( Config $config)
Parameters
Config$configThe 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 645 of file MediaWikiServices.php.

Member Function Documentation

◆ allowGlobalInstance()

static MediaWiki\MediaWikiServices::allowGlobalInstance ( )
static

Allows a global service container instance to exist.

This should be called only after configuration settings have been read and extensions have been registered. Any change made to configuration after this method has been called may be ineffective or even harmful.

See also
getInstance()
Since
1.36

Definition at line 253 of file MediaWikiServices.php.

◆ disableStorage()

MediaWiki\MediaWikiServices::disableStorage ( )

Disables all storage layer services.

After calling this, any attempt to access the storage layer will result in an error. Use resetGlobalInstance() to restore normal operation.

Since
1.40
Warning
This is intended for extreme situations only and should never be used while serving normal web requests. Legitimate use cases for this method include the installation process. Test fixtures may also use this, if the fixture relies on globalState.
See also
resetGlobalInstance()
resetChildProcessServices()

Definition at line 494 of file MediaWikiServices.php.

References LocalisationCache\disableBackend().

◆ disableStorageBackend()

static MediaWiki\MediaWikiServices::disableStorageBackend ( )
static

Disables all storage layer services.

After calling this, any attempt to access the storage layer will result in an error.

Since
1.28
Deprecated
since 1.40, use disableStorage() instead.
Warning
This is intended for extreme situations, see the documentation of disableStorage() for details.
See also
resetGlobalInstance()
resetChildProcessServices()

Definition at line 474 of file MediaWikiServices.php.

◆ failIfResetNotAllowed()

static MediaWiki\MediaWikiServices::failIfResetNotAllowed ( $method)
static

Convenience method that throws an exception unless it is called during a phase in which resetting of global services is allowed.

In general, services should not be reset individually, since that may introduce inconsistencies.

Since
1.28

This method will throw an exception if:

  • self::$resetInProgress is false (to allow all services to be reset together via resetGlobalInstance)
  • and MEDIAWIKI_INSTALL is not defined (to allow services to be reset during installation)
  • and MW_PHPUNIT_TEST is not defined (to allow services to be reset during testing)

This method is intended to be used to safeguard against accidentally resetting global service instances that are not yet managed by MediaWikiServices. It is defined here in the MediaWikiServices services class to have a central place for managing service bootstrapping and resetting.

Parameters
string$methodthe name of the caller method, as given by METHOD.
See also
resetGlobalInstance()
forceGlobalInstance()
disableStorage()

Definition at line 629 of file MediaWikiServices.php.

◆ forceGlobalInstance()

static MediaWiki\MediaWikiServices::forceGlobalInstance ( MediaWikiServices $services)
static

Replaces the global MediaWikiServices instance.

Since
1.28
Note
This is for use in PHPUnit tests only!
Parameters
MediaWikiServices$servicesThe new MediaWikiServices object.
Returns
MediaWikiServices The old MediaWikiServices object, so it can be restored later.

Definition at line 332 of file MediaWikiServices.php.

◆ getActionFactory()

MediaWiki\MediaWikiServices::getActionFactory ( )
Since
1.37
Returns
ActionFactory

Definition at line 660 of file MediaWikiServices.php.

◆ getActorMigration()

MediaWiki\MediaWikiServices::getActorMigration ( )
Since
1.31
Returns
ActorMigration

Definition at line 668 of file MediaWikiServices.php.

◆ getActorNormalization()

MediaWiki\MediaWikiServices::getActorNormalization ( )
Returns
ActorNormalization
Since
1.36

Definition at line 676 of file MediaWikiServices.php.

◆ getActorStore()

MediaWiki\MediaWikiServices::getActorStore ( )
Returns
ActorStore
Since
1.36

Definition at line 684 of file MediaWikiServices.php.

◆ getActorStoreFactory()

MediaWiki\MediaWikiServices::getActorStoreFactory ( )
Since
1.36
Returns
ActorStoreFactory

Definition at line 692 of file MediaWikiServices.php.

◆ getArchivedRevisionLookup()

MediaWiki\MediaWikiServices::getArchivedRevisionLookup ( )
Since
1.38
Returns
ArchivedRevisionLookup

Definition at line 700 of file MediaWikiServices.php.

◆ getAuthManager()

MediaWiki\MediaWikiServices::getAuthManager ( )
Since
1.35
Returns
AuthManager

Definition at line 708 of file MediaWikiServices.php.

◆ getBacklinkCacheFactory()

MediaWiki\MediaWikiServices::getBacklinkCacheFactory ( )
Since
1.37
Returns
BacklinkCacheFactory

Definition at line 716 of file MediaWikiServices.php.

◆ getBadFileLookup()

MediaWiki\MediaWikiServices::getBadFileLookup ( )
Since
1.34
Returns
BadFileLookup

Definition at line 724 of file MediaWikiServices.php.

◆ getBlobStore()

MediaWiki\MediaWikiServices::getBlobStore ( )
Since
1.31
Returns
BlobStore

Definition at line 732 of file MediaWikiServices.php.

◆ getBlobStoreFactory()

MediaWiki\MediaWikiServices::getBlobStoreFactory ( )
Since
1.31
Returns
BlobStoreFactory

Definition at line 740 of file MediaWikiServices.php.

◆ getBlockActionInfo()

MediaWiki\MediaWikiServices::getBlockActionInfo ( )
Since
1.37
Returns
BlockActionInfo

Definition at line 748 of file MediaWikiServices.php.

◆ getBlockErrorFormatter()

MediaWiki\MediaWikiServices::getBlockErrorFormatter ( )
Since
1.35
Returns
BlockErrorFormatter

Definition at line 756 of file MediaWikiServices.php.

◆ getBlockManager()

MediaWiki\MediaWikiServices::getBlockManager ( )
Since
1.34
Returns
BlockManager

Definition at line 764 of file MediaWikiServices.php.

◆ getBlockPermissionCheckerFactory()

MediaWiki\MediaWikiServices::getBlockPermissionCheckerFactory ( )
Since
1.35
Returns
BlockPermissionCheckerFactory

Definition at line 772 of file MediaWikiServices.php.

◆ getBlockRestrictionStore()

MediaWiki\MediaWikiServices::getBlockRestrictionStore ( )
Since
1.33
Returns
BlockRestrictionStore

Definition at line 780 of file MediaWikiServices.php.

◆ getBlockRestrictionStoreFactory()

MediaWiki\MediaWikiServices::getBlockRestrictionStoreFactory ( )
Since
1.38
Returns
BlockRestrictionStoreFactory

Definition at line 788 of file MediaWikiServices.php.

◆ getBlockUserFactory()

MediaWiki\MediaWikiServices::getBlockUserFactory ( )
Since
1.36
Returns
BlockUserFactory

Definition at line 796 of file MediaWikiServices.php.

◆ getBlockUtils()

MediaWiki\MediaWikiServices::getBlockUtils ( )
Since
1.36
Returns
BlockUtils

Definition at line 804 of file MediaWikiServices.php.

◆ getBootstrapConfig()

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.

Note
This should only be used during bootstrapping, in particular when creating the MainConfig service. Application logic should use getMainConfig() to get a Config instances.
Since
1.27
Returns
Config

Definition at line 821 of file MediaWikiServices.php.

◆ getBotPasswordStore()

MediaWiki\MediaWikiServices::getBotPasswordStore ( )
Since
1.37
Returns
BotPasswordStore

Definition at line 829 of file MediaWikiServices.php.

◆ getCentralIdLookup()

MediaWiki\MediaWikiServices::getCentralIdLookup ( )
Since
1.37
Returns
CentralIdLookup

Definition at line 837 of file MediaWikiServices.php.

◆ getCentralIdLookupFactory()

MediaWiki\MediaWikiServices::getCentralIdLookupFactory ( )
Since
1.37
Returns
CentralIdLookupFactory

Definition at line 845 of file MediaWikiServices.php.

◆ getChangeTagDefStore()

MediaWiki\MediaWikiServices::getChangeTagDefStore ( )
Since
1.32
Returns
NameTableStore

Definition at line 853 of file MediaWikiServices.php.

◆ getCollationFactory()

MediaWiki\MediaWikiServices::getCollationFactory ( )
Since
1.37
Returns
CollationFactory

Definition at line 861 of file MediaWikiServices.php.

◆ getCommentFormatter()

MediaWiki\MediaWikiServices::getCommentFormatter ( )
Returns
CommentFormatter
Since
1.38

Definition at line 869 of file MediaWikiServices.php.

◆ getCommentStore()

MediaWiki\MediaWikiServices::getCommentStore ( )
Since
1.31
Returns
CommentStore

Definition at line 877 of file MediaWikiServices.php.

◆ getConfigFactory()

MediaWiki\MediaWikiServices::getConfigFactory ( )
Since
1.27
Returns
ConfigFactory

Definition at line 885 of file MediaWikiServices.php.

◆ getConfigRepository()

MediaWiki\MediaWikiServices::getConfigRepository ( )
Since
1.32
Returns
ConfigRepository

Definition at line 893 of file MediaWikiServices.php.

◆ getConfigSchema()

MediaWiki\MediaWikiServices::getConfigSchema ( )
Since
1.39
Returns
ConfigSchema

Definition at line 901 of file MediaWikiServices.php.

◆ getConfiguredReadOnlyMode()

MediaWiki\MediaWikiServices::getConfiguredReadOnlyMode ( )
Since
1.29
Returns
ConfiguredReadOnlyMode

Definition at line 909 of file MediaWikiServices.php.

◆ getContentHandlerFactory()

MediaWiki\MediaWikiServices::getContentHandlerFactory ( )
Since
1.35
Returns
IContentHandlerFactory

Definition at line 917 of file MediaWikiServices.php.

◆ getContentLanguage()

MediaWiki\MediaWikiServices::getContentLanguage ( )
Since
1.32
Returns
Language

Definition at line 925 of file MediaWikiServices.php.

◆ getContentModelChangeFactory()

MediaWiki\MediaWikiServices::getContentModelChangeFactory ( )
Since
1.35
Returns
ContentModelChangeFactory

Definition at line 933 of file MediaWikiServices.php.

◆ getContentModelStore()

MediaWiki\MediaWikiServices::getContentModelStore ( )
Since
1.31
Returns
NameTableStore

Definition at line 941 of file MediaWikiServices.php.

◆ getContentRenderer()

MediaWiki\MediaWikiServices::getContentRenderer ( )
Since
1.38
Returns
ContentRenderer

Definition at line 949 of file MediaWikiServices.php.

◆ getContentTransformer()

MediaWiki\MediaWikiServices::getContentTransformer ( )
Since
1.37
Returns
ContentTransformer

Definition at line 957 of file MediaWikiServices.php.

◆ getContributionsLookup()

MediaWiki\MediaWikiServices::getContributionsLookup ( )
Since
1.35
Returns
ContributionsLookup

Definition at line 965 of file MediaWikiServices.php.

◆ getCriticalSectionProvider()

MediaWiki\MediaWikiServices::getCriticalSectionProvider ( )
Since
1.36
Returns
CriticalSectionProvider

Definition at line 973 of file MediaWikiServices.php.

◆ getCryptHKDF()

MediaWiki\MediaWikiServices::getCryptHKDF ( )
Since
1.28
Returns
CryptHKDF

Definition at line 981 of file MediaWikiServices.php.

◆ getDatabaseBlockStore()

MediaWiki\MediaWikiServices::getDatabaseBlockStore ( )
Since
1.36
Returns
DatabaseBlockStore

Definition at line 989 of file MediaWikiServices.php.

◆ getDatabaseBlockStoreFactory()

MediaWiki\MediaWikiServices::getDatabaseBlockStoreFactory ( )
Since
1.40
Returns
DatabaseBlockStoreFactory

Definition at line 997 of file MediaWikiServices.php.

◆ getDatabaseFactory()

MediaWiki\MediaWikiServices::getDatabaseFactory ( )
Since
1.39
Returns
DatabaseFactory

Definition at line 1005 of file MediaWikiServices.php.

◆ getDateFormatterFactory()

MediaWiki\MediaWikiServices::getDateFormatterFactory ( )
Since
1.33
Returns
DateFormatterFactory

Definition at line 1013 of file MediaWikiServices.php.

◆ getDBLoadBalancer()

MediaWiki\MediaWikiServices::getDBLoadBalancer ( )
Since
1.28
Returns
ILoadBalancer The main DB load balancer for the local wiki.

Definition at line 1021 of file MediaWikiServices.php.

◆ getDBLoadBalancerFactory()

MediaWiki\MediaWikiServices::getDBLoadBalancerFactory ( )
Since
1.28
Returns
LBFactory

Definition at line 1029 of file MediaWikiServices.php.

◆ getDBLoadBalancerFactoryConfigBuilder()

MediaWiki\MediaWikiServices::getDBLoadBalancerFactoryConfigBuilder ( )
Since
1.39
Returns
MWLBFactory

Definition at line 1037 of file MediaWikiServices.php.

◆ getDeletePageFactory()

MediaWiki\MediaWikiServices::getDeletePageFactory ( )
Since
1.37
Returns
DeletePageFactory

Definition at line 1045 of file MediaWikiServices.php.

◆ getEmailer()

MediaWiki\MediaWikiServices::getEmailer ( )
Since
1.35
Returns
IEmailer

Definition at line 1053 of file MediaWikiServices.php.

◆ getEventRelayerGroup()

MediaWiki\MediaWikiServices::getEventRelayerGroup ( )
Since
1.27
Returns
EventRelayerGroup

Definition at line 1061 of file MediaWikiServices.php.

◆ getExternalStoreAccess()

MediaWiki\MediaWikiServices::getExternalStoreAccess ( )
Since
1.34
Returns
ExternalStoreAccess

Definition at line 1069 of file MediaWikiServices.php.

◆ getExternalStoreFactory()

MediaWiki\MediaWikiServices::getExternalStoreFactory ( )
Since
1.31
Returns
ExternalStoreFactory

Definition at line 1077 of file MediaWikiServices.php.

◆ getFileBackendGroup()

MediaWiki\MediaWikiServices::getFileBackendGroup ( )
Since
1.35
Returns
FileBackendGroup

Definition at line 1085 of file MediaWikiServices.php.

◆ getGenderCache()

MediaWiki\MediaWikiServices::getGenderCache ( )
Since
1.28
Returns
GenderCache

Definition at line 1093 of file MediaWikiServices.php.

◆ getGlobalIdGenerator()

MediaWiki\MediaWikiServices::getGlobalIdGenerator ( )
Since
1.35
Returns
GlobalIdGenerator

Definition at line 1101 of file MediaWikiServices.php.

◆ getGrantsInfo()

MediaWiki\MediaWikiServices::getGrantsInfo ( )
Since
1.38
Returns
GrantsInfo

Definition at line 1109 of file MediaWikiServices.php.

◆ getGrantsLocalization()

MediaWiki\MediaWikiServices::getGrantsLocalization ( )
Since
1.38
Returns
GrantsLocalization

Definition at line 1117 of file MediaWikiServices.php.

◆ getGroupPermissionsLookup()

MediaWiki\MediaWikiServices::getGroupPermissionsLookup ( )
Since
1.36
Returns
GroupPermissionsLookup

Definition at line 1125 of file MediaWikiServices.php.

◆ getHookContainer()

MediaWiki\MediaWikiServices::getHookContainer ( )
Since
1.35
Returns
HookContainer

Definition at line 1133 of file MediaWikiServices.php.

◆ getHtmlCacheUpdater()

MediaWiki\MediaWikiServices::getHtmlCacheUpdater ( )
Since
1.35
Returns
HtmlCacheUpdater

Definition at line 1141 of file MediaWikiServices.php.

◆ getHtmlTransformFactory()

MediaWiki\MediaWikiServices::getHtmlTransformFactory ( )
Returns
HtmlTransformFactory
Since
1.39

Definition at line 1149 of file MediaWikiServices.php.

◆ getHttpRequestFactory()

MediaWiki\MediaWikiServices::getHttpRequestFactory ( )
Since
1.31
Returns
HttpRequestFactory

Definition at line 1157 of file MediaWikiServices.php.

◆ getInstance()

static MediaWiki\MediaWikiServices::getInstance ( )
static

Returns the global default instance of the top level service locator.

Note
if called before allowGlobalInstance(), this method will fail.
Since
1.27

The default instance is initialized using the service instantiator functions defined in ServiceWiring.php.

Note
This should only be called by static functions! The instance returned here should not be passed around! Objects that need access to a service should have that service injected into the constructor, never a service locator!
Returns
MediaWikiServices

Definition at line 290 of file MediaWikiServices.php.

References wfDeprecatedMsg().

Referenced by MediaWiki\Site\MediaWikiPageNameNormalizer\__construct(), MediaWiki\Parser\MagicWord\__construct(), MediaWiki\Parser\MagicWordArray\__construct(), MediaWiki\RenameUser\RenameuserSQL\__construct(), MediaWiki\Session\SessionManager\__construct(), MediaWiki\Auth\Throttler\__construct(), MediaWiki\EditPage\EditPage\__construct(), MediaWiki\Page\ProtectionForm\__construct(), MediaWiki\Actions\FileDeleteAction\__construct(), MediaWiki\ResourceLoader\ResourceLoader\__construct(), MediaWiki\Category\CategoryViewer\__construct(), MediaWiki\Deferred\LinksUpdate\LinksUpdate\__construct(), MediaWiki\ResourceLoader\Context\__construct(), MediaWiki\ResourceLoader\MessageBlobStore\__construct(), MediaWiki\Preferences\DefaultPreferencesFactory\__construct(), MediaWiki\Session\SessionBackend\__construct(), MediaWiki\Session\PHPSessionHandler\__construct(), MediaWiki\EditPage\TextConflictHelper\__construct(), MediaWiki\Specials\SpecialUserRights\__construct(), MediaWiki\Category\CategoryViewer\addSubcategoryObject(), MediaWiki\EditPage\TextboxBuilder\buildTextboxAttribs(), MediaWiki\Html\Html\buttonAttributes(), MediaWiki\Feed\FeedUtils\checkFeedOutput(), MediaWiki\Linker\Linker\commentBlock(), MediaWiki\Block\DatabaseBlock\delete(), MediaWiki\Block\DatabaseBlock\doAutoblock(), MediaWiki\Deferred\LinksUpdate\LinksDeletionUpdate\doIncrementalUpdate(), MediaWiki\EditPage\EditPage\edit(), MediaWiki\ResourceLoader\FileModule\extractBasePaths(), MediaWiki\Linker\Linker\formatComment(), MediaWiki\Feed\FeedUtils\formatDiff(), MediaWiki\Feed\FeedUtils\formatDiffRow(), MediaWiki\Feed\FeedUtils\formatDiffRow2(), MediaWiki\Linker\Linker\formatLinksInComment(), MediaWiki\Deferred\LinksUpdate\LinksTableGroup\get(), MediaWiki\WikiMap\WikiMap\getCanonicalServerInfoForAllWikis(), MediaWiki\ResourceLoader\WikiModule\getContent(), MediaWiki\ResourceLoader\WikiModule\getContentObj(), MediaWiki\Request\FauxRequest\getCookie(), MediaWiki\Auth\UserDataAuthenticationRequest\getFieldInfo(), MediaWiki\ResourceLoader\Module\getFlip(), MediaWiki\Linker\Linker\getImageLinkMTOParams(), MediaWiki\Linker\Linker\getInvalidTitleDescription(), MediaWiki\Block\DatabaseBlock\getIpFragment(), MediaWiki\Feed\FeedItem\getLanguage(), MediaWiki\Rest\EntryPoint\getMainRequest(), MediaWiki\Request\WebRequestUpload\getName(), MediaWiki\ResourceLoader\UserModule\getPages(), MediaWiki\ResourceLoader\UserStylesModule\getPages(), MediaWiki\Mail\EmailUser\getPermissionsError(), MediaWiki\ExternalLinks\LinkFilter\getProtocolPrefix(), MediaWiki\Session\SessionManager\getProviders(), MediaWiki\Block\DatabaseBlock\getQueryInfo(), MediaWiki\ResourceLoader\UserOptionsModule\getScript(), MediaWiki\CommentStore\CommentStore\getStore(), MediaWiki\Html\TemplateParser\getTemplate(), MediaWiki\EditPage\TextboxBuilder\getTextboxProtectionCSSClasses(), MediaWiki\Html\Html\getTextInputAttributes(), MediaWiki\Linker\Linker\getUploadUrl(), MediaWiki\Html\Html\htmlHeader(), MediaWiki\Feed\ChannelFeed\httpHeaders(), MediaWiki\Block\DatabaseBlock\initFromRow(), MediaWiki\Html\Html\inlineScript(), MediaWiki\Block\DatabaseBlock\insert(), MediaWiki\Block\DatabaseBlock\isExemptedFromAutoblocks(), MediaWiki\Linker\Linker\link(), MediaWiki\Html\Html\linkedScript(), MediaWiki\Session\SessionManager\logPotentialSessionLeakage(), MediaWiki\Rest\EntryPoint\main(), MediaWiki\Linker\Linker\makeBrokenImageLinkObj(), MediaWiki\Linker\Linker\makeImageLink(), MediaWiki\Linker\Linker\makeMediaLinkObj(), MediaWiki\Linker\Linker\makeThumbLink2(), MediaWiki\ResourceLoader\ResourceLoader\measureResponseTime(), MediaWiki\Html\Html\namespaceSelectorOptions(), MediaWiki\Session\UserInfo\newFromId(), MediaWiki\Session\UserInfo\newFromName(), MediaWiki\Block\DatabaseBlock\newLoad(), MediaWiki\User\ActorMigration\newMigration(), MediaWiki\Auth\TemporaryPasswordAuthenticationRequest\newRandom(), MediaWiki\CommentStore\CommentStoreComment\newUnsavedComment(), MediaWiki\Linker\Linker\normalizeSubpageLink(), MediaWiki\Feed\AtomFeed\outItem(), MediaWiki\Rest\Handler\PageHTMLHandler\postValidationSetup(), MediaWiki\Rest\Handler\RevisionHTMLHandler\postValidationSetup(), MediaWiki\ExternalLinks\LinkFilter\prepareProtocols(), MediaWiki\Linker\Linker\processResponsiveImages(), MediaWiki\Deferred\LinksUpdate\LinksUpdate\queueRecursiveJobs(), MediaWiki\Deferred\LinksUpdate\LinksUpdate\queueRecursiveJobsForTable(), MediaWiki\Search\SearchWidgets\BasicSearchResultSetWidget\render(), MediaWiki\Linker\Linker\revComment(), MediaWiki\Session\SessionBackend\save(), MediaWiki\Request\WebResponse\setCookie(), MediaWiki\Request\FauxRequest\setCookies(), MediaWiki\Mail\EmailUser\submit(), MediaWiki\Auth\CheckBlocksSecondaryAuthenticationProvider\testUserForCreation(), MediaWiki\Block\DatabaseBlock\update(), MediaWiki\Linker\Linker\userLink(), MediaWiki\Linker\Linker\userToolLinks(), and MediaWiki\Mail\EmailUser\validateTarget().

◆ getInterwikiLookup()

MediaWiki\MediaWikiServices::getInterwikiLookup ( )
Since
1.28
Returns
InterwikiLookup

Definition at line 1165 of file MediaWikiServices.php.

◆ getJobFactory()

MediaWiki\MediaWikiServices::getJobFactory ( )
Since
1.40
Returns
JobFactory

Definition at line 1173 of file MediaWikiServices.php.

◆ getJobQueueGroup()

MediaWiki\MediaWikiServices::getJobQueueGroup ( )
Since
1.37
Returns
JobQueueGroup

Definition at line 1181 of file MediaWikiServices.php.

◆ getJobQueueGroupFactory()

MediaWiki\MediaWikiServices::getJobQueueGroupFactory ( )
Since
1.37
Returns
JobQueueGroupFactory

Definition at line 1189 of file MediaWikiServices.php.

◆ getJobRunner()

MediaWiki\MediaWikiServices::getJobRunner ( )
Since
1.35
Returns
JobRunner

Definition at line 1197 of file MediaWikiServices.php.

◆ getJsonCodec()

MediaWiki\MediaWikiServices::getJsonCodec ( )
Since
1.36
Returns
JsonCodec

Definition at line 1205 of file MediaWikiServices.php.

◆ getLanguageConverterFactory()

MediaWiki\MediaWikiServices::getLanguageConverterFactory ( )
Since
1.35
Returns
LanguageConverterFactory

Definition at line 1213 of file MediaWikiServices.php.

◆ getLanguageFactory()

MediaWiki\MediaWikiServices::getLanguageFactory ( )
Since
1.35
Returns
LanguageFactory

Definition at line 1221 of file MediaWikiServices.php.

◆ getLanguageFallback()

MediaWiki\MediaWikiServices::getLanguageFallback ( )
Since
1.35
Returns
LanguageFallback

Definition at line 1229 of file MediaWikiServices.php.

◆ getLanguageNameUtils()

MediaWiki\MediaWikiServices::getLanguageNameUtils ( )
Since
1.34
Returns
LanguageNameUtils

Definition at line 1237 of file MediaWikiServices.php.

◆ getLinkBatchFactory()

MediaWiki\MediaWikiServices::getLinkBatchFactory ( )
Since
1.35
Returns
LinkBatchFactory

Definition at line 1245 of file MediaWikiServices.php.

◆ getLinkCache()

MediaWiki\MediaWikiServices::getLinkCache ( )
Since
1.28
Returns
LinkCache

Definition at line 1253 of file MediaWikiServices.php.

◆ getLinkRenderer()

MediaWiki\MediaWikiServices::getLinkRenderer ( )

LinkRenderer instance that can be used if no custom options are needed.

Since
1.28
Returns
LinkRenderer

Definition at line 1264 of file MediaWikiServices.php.

◆ getLinkRendererFactory()

MediaWiki\MediaWikiServices::getLinkRendererFactory ( )
Since
1.28
Returns
LinkRendererFactory

Definition at line 1272 of file MediaWikiServices.php.

◆ getLinksMigration()

MediaWiki\MediaWikiServices::getLinksMigration ( )
Since
1.39
Returns
LinksMigration

Definition at line 1280 of file MediaWikiServices.php.

◆ getLinkTargetLookup()

MediaWiki\MediaWikiServices::getLinkTargetLookup ( )
Since
1.38
Returns
LinkTargetLookup

Definition at line 1288 of file MediaWikiServices.php.

◆ getLocalisationCache()

MediaWiki\MediaWikiServices::getLocalisationCache ( )
Since
1.34
Returns
LocalisationCache

Definition at line 1296 of file MediaWikiServices.php.

◆ getLocalServerObjectCache()

MediaWiki\MediaWikiServices::getLocalServerObjectCache ( )

Returns the main server-local cache, yielding EmptyBagOStuff if there is none.

In web request mode, the cache should at least be shared among web workers. In CLI mode, the cache should at least be shared among processes run by the same user.

Since
1.28
Returns
BagOStuff

Definition at line 1309 of file MediaWikiServices.php.

◆ getLockManagerGroupFactory()

MediaWiki\MediaWikiServices::getLockManagerGroupFactory ( )
Since
1.34
Returns
LockManagerGroupFactory

Definition at line 1317 of file MediaWikiServices.php.

◆ getMagicWordFactory()

MediaWiki\MediaWikiServices::getMagicWordFactory ( )
Since
1.32
Returns
MagicWordFactory

Definition at line 1325 of file MediaWikiServices.php.

◆ getMainConfig()

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().

Since
1.27
Returns
Config

Definition at line 1336 of file MediaWikiServices.php.

◆ getMainObjectStash()

MediaWiki\MediaWikiServices::getMainObjectStash ( )

Returns the main object stash, yielding EmptyBagOStuff if there is none.

The stash should be shared among all datacenters

Since
1.28
Returns
BagOStuff

Definition at line 1348 of file MediaWikiServices.php.

◆ getMainWANObjectCache()

MediaWiki\MediaWikiServices::getMainWANObjectCache ( )

Returns the main WAN cache, yielding EmptyBagOStuff if there is none.

The cache should relay any purge operations to all datacenters

Since
1.28
Returns
WANObjectCache

Definition at line 1360 of file MediaWikiServices.php.

◆ getMediaHandlerFactory()

MediaWiki\MediaWikiServices::getMediaHandlerFactory ( )
Since
1.28
Returns
MediaHandlerFactory

Definition at line 1368 of file MediaWikiServices.php.

◆ getMergeHistoryFactory()

MediaWiki\MediaWikiServices::getMergeHistoryFactory ( )
Since
1.35
Returns
MergeHistoryFactory

Definition at line 1376 of file MediaWikiServices.php.

◆ getMessageCache()

MediaWiki\MediaWikiServices::getMessageCache ( )
Since
1.34
Returns
MessageCache

Definition at line 1384 of file MediaWikiServices.php.

◆ getMessageFormatterFactory()

MediaWiki\MediaWikiServices::getMessageFormatterFactory ( )
Since
1.34
Returns
IMessageFormatterFactory

Definition at line 1392 of file MediaWikiServices.php.

◆ getMimeAnalyzer()

MediaWiki\MediaWikiServices::getMimeAnalyzer ( )
Since
1.28
Returns
MimeAnalyzer

Definition at line 1400 of file MediaWikiServices.php.

◆ getMovePageFactory()

MediaWiki\MediaWikiServices::getMovePageFactory ( )
Since
1.34
Returns
MovePageFactory

Definition at line 1408 of file MediaWikiServices.php.

◆ getNamespaceInfo()

MediaWiki\MediaWikiServices::getNamespaceInfo ( )
Since
1.34
Returns
NamespaceInfo

Definition at line 1416 of file MediaWikiServices.php.

◆ getNameTableStoreFactory()

MediaWiki\MediaWikiServices::getNameTableStoreFactory ( )
Since
1.32
Returns
NameTableStoreFactory

Definition at line 1424 of file MediaWikiServices.php.

◆ getObjectFactory()

MediaWiki\MediaWikiServices::getObjectFactory ( )

ObjectFactory is intended for instantiating "handlers" from declarative definitions, such as Action API modules, special pages, or REST API handlers.

Since
1.34
Returns
ObjectFactory

Definition at line 1435 of file MediaWikiServices.php.

◆ getOldRevisionImporter()

MediaWiki\MediaWikiServices::getOldRevisionImporter ( )
Since
1.32
Returns
OldRevisionImporter

Definition at line 1443 of file MediaWikiServices.php.

◆ getPageEditStash()

MediaWiki\MediaWikiServices::getPageEditStash ( )
Returns
PageEditStash
Since
1.34

Definition at line 1451 of file MediaWikiServices.php.

◆ getPageProps()

MediaWiki\MediaWikiServices::getPageProps ( )
Returns
PageProps
Since
1.36

Definition at line 1459 of file MediaWikiServices.php.

◆ getPageRestHelperFactory()

MediaWiki\MediaWikiServices::getPageRestHelperFactory ( )
Returns
PageRestHelperFactory
Since
1.40

Definition at line 1467 of file MediaWikiServices.php.

◆ getPageStore()

MediaWiki\MediaWikiServices::getPageStore ( )
Returns
PageStore
Since
1.36

Definition at line 1475 of file MediaWikiServices.php.

◆ getPageStoreFactory()

MediaWiki\MediaWikiServices::getPageStoreFactory ( )
Returns
PageStoreFactory
Since
1.36

Definition at line 1483 of file MediaWikiServices.php.

◆ getPageUpdaterFactory()

MediaWiki\MediaWikiServices::getPageUpdaterFactory ( )
Since
1.37
Returns
PageUpdaterFactory

Definition at line 1491 of file MediaWikiServices.php.

◆ getParser()

MediaWiki\MediaWikiServices::getParser ( )

Get the main Parser instance.

This is unsafe when the caller is not in a top-level context, because re-entering the parser will throw an exception.

Since
1.29
Returns
Parser

Definition at line 1503 of file MediaWikiServices.php.

◆ getParserCache()

MediaWiki\MediaWikiServices::getParserCache ( )
Since
1.30
Returns
ParserCache

Definition at line 1511 of file MediaWikiServices.php.

◆ getParserCacheFactory()

MediaWiki\MediaWikiServices::getParserCacheFactory ( )
Since
1.36
Returns
ParserCacheFactory

Definition at line 1519 of file MediaWikiServices.php.

◆ getParserFactory()

MediaWiki\MediaWikiServices::getParserFactory ( )
Since
1.32
Returns
ParserFactory

Definition at line 1527 of file MediaWikiServices.php.

◆ getParserOutputAccess()

MediaWiki\MediaWikiServices::getParserOutputAccess ( )
Returns
ParserOutputAccess
Since
1.36

Definition at line 1535 of file MediaWikiServices.php.

◆ getParsoidDataAccess()

MediaWiki\MediaWikiServices::getParsoidDataAccess ( )
Returns
DataAccess
Since
1.39
Access: internal

Definition at line 1544 of file MediaWikiServices.php.

◆ getParsoidOutputAccess()

MediaWiki\MediaWikiServices::getParsoidOutputAccess ( )
Returns
ParsoidOutputAccess
Since
1.39
Stability: unstable

Definition at line 1553 of file MediaWikiServices.php.

◆ getParsoidOutputStash()

MediaWiki\MediaWikiServices::getParsoidOutputStash ( )
Returns
ParsoidOutputStash
Since
1.39
Stability: unstable
since 1.39, should be stable before release of 1.39

Definition at line 1562 of file MediaWikiServices.php.

◆ getParsoidPageConfigFactory()

MediaWiki\MediaWikiServices::getParsoidPageConfigFactory ( )
Returns
PageConfigFactory
Since
1.39
Access: internal

Definition at line 1571 of file MediaWikiServices.php.

◆ getParsoidSiteConfig()

MediaWiki\MediaWikiServices::getParsoidSiteConfig ( )
Returns
SiteConfig
Since
1.39
Access: internal

Definition at line 1580 of file MediaWikiServices.php.

◆ getPasswordFactory()

MediaWiki\MediaWikiServices::getPasswordFactory ( )
Since
1.32
Returns
PasswordFactory

Definition at line 1588 of file MediaWikiServices.php.

◆ getPasswordReset()

MediaWiki\MediaWikiServices::getPasswordReset ( )
Since
1.34
Returns
PasswordReset

Definition at line 1596 of file MediaWikiServices.php.

◆ getPerDbNameStatsdDataFactory()

MediaWiki\MediaWikiServices::getPerDbNameStatsdDataFactory ( )
Since
1.32
Returns
StatsdDataFactoryInterface

Definition at line 1604 of file MediaWikiServices.php.

◆ getPermissionManager()

MediaWiki\MediaWikiServices::getPermissionManager ( )
Since
1.33
Returns
PermissionManager

Definition at line 1612 of file MediaWikiServices.php.

◆ getPoolCounterFactory()

MediaWiki\MediaWikiServices::getPoolCounterFactory ( )
Since
1.40
Returns
PoolCounterFactory

Definition at line 1620 of file MediaWikiServices.php.

◆ getPreferencesFactory()

MediaWiki\MediaWikiServices::getPreferencesFactory ( )
Since
1.31
Returns
PreferencesFactory

Definition at line 1628 of file MediaWikiServices.php.

◆ getProxyLookup()

MediaWiki\MediaWikiServices::getProxyLookup ( )
Since
1.28
Returns
ProxyLookup

Definition at line 1636 of file MediaWikiServices.php.

◆ getRateLimiter()

MediaWiki\MediaWikiServices::getRateLimiter ( )
Since
1.39
Returns
RateLimiter

Definition at line 1644 of file MediaWikiServices.php.

◆ getReadOnlyMode()

MediaWiki\MediaWikiServices::getReadOnlyMode ( )
Since
1.29
Returns
ReadOnlyMode

Definition at line 1652 of file MediaWikiServices.php.

◆ getRedirectLookup()

MediaWiki\MediaWikiServices::getRedirectLookup ( )
Since
1.38
Returns
RedirectLookup

Definition at line 1660 of file MediaWikiServices.php.

◆ getRedirectStore()

MediaWiki\MediaWikiServices::getRedirectStore ( )
Since
1.38
Returns
RedirectStore

Definition at line 1668 of file MediaWikiServices.php.

◆ getRepoGroup()

MediaWiki\MediaWikiServices::getRepoGroup ( )
Since
1.34
Returns
RepoGroup

Definition at line 1676 of file MediaWikiServices.php.

◆ getResourceLoader()

MediaWiki\MediaWikiServices::getResourceLoader ( )
Since
1.33
Returns
ResourceLoader

Definition at line 1684 of file MediaWikiServices.php.

◆ getRestrictionStore()

MediaWiki\MediaWikiServices::getRestrictionStore ( )
Since
1.37
Returns
RestrictionStore

Definition at line 1692 of file MediaWikiServices.php.

◆ getRevertedTagUpdateManager()

MediaWiki\MediaWikiServices::getRevertedTagUpdateManager ( )
Since
1.36
Returns
RevertedTagUpdateManager

Definition at line 1700 of file MediaWikiServices.php.

◆ getRevisionFactory()

MediaWiki\MediaWikiServices::getRevisionFactory ( )
Since
1.31
Returns
RevisionFactory

Definition at line 1708 of file MediaWikiServices.php.

◆ getRevisionLookup()

MediaWiki\MediaWikiServices::getRevisionLookup ( )
Since
1.31
Returns
RevisionLookup

Definition at line 1716 of file MediaWikiServices.php.

◆ getRevisionRenderer()

MediaWiki\MediaWikiServices::getRevisionRenderer ( )
Since
1.32
Returns
RevisionRenderer

Definition at line 1724 of file MediaWikiServices.php.

◆ getRevisionStore()

MediaWiki\MediaWikiServices::getRevisionStore ( )
Since
1.31
Returns
RevisionStore

Definition at line 1732 of file MediaWikiServices.php.

◆ getRevisionStoreFactory()

MediaWiki\MediaWikiServices::getRevisionStoreFactory ( )
Since
1.32
Returns
RevisionStoreFactory

Definition at line 1740 of file MediaWikiServices.php.

◆ getRollbackPageFactory()

MediaWiki\MediaWikiServices::getRollbackPageFactory ( )
Since
1.37
Returns
RollbackPageFactory

Definition at line 1748 of file MediaWikiServices.php.

◆ getRowCommentFormatter()

MediaWiki\MediaWikiServices::getRowCommentFormatter ( )
Since
1.38
Returns
RowCommentFormatter

Definition at line 1756 of file MediaWikiServices.php.

◆ getSearchEngineConfig()

MediaWiki\MediaWikiServices::getSearchEngineConfig ( )
Since
1.27
Returns
SearchEngineConfig

Definition at line 1773 of file MediaWikiServices.php.

◆ getSearchEngineFactory()

MediaWiki\MediaWikiServices::getSearchEngineFactory ( )
Since
1.27
Returns
SearchEngineFactory

Definition at line 1781 of file MediaWikiServices.php.

◆ getSearchResultThumbnailProvider()

MediaWiki\MediaWikiServices::getSearchResultThumbnailProvider ( )
Since
1.40
Returns
SearchResultThumbnailProvider

Definition at line 1789 of file MediaWikiServices.php.

◆ getService()

MediaWiki\MediaWikiServices::getService ( $name)

Definition at line 312 of file MediaWikiServices.php.

References wfDeprecatedMsg().

◆ getShellboxClientFactory()

MediaWiki\MediaWikiServices::getShellboxClientFactory ( )
Since
1.36
Returns
ShellboxClientFactory

Definition at line 1797 of file MediaWikiServices.php.

◆ getShellCommandFactory()

MediaWiki\MediaWikiServices::getShellCommandFactory ( )
Since
1.30
Returns
CommandFactory

Definition at line 1805 of file MediaWikiServices.php.

◆ getSignatureValidatorFactory()

MediaWiki\MediaWikiServices::getSignatureValidatorFactory ( )
Since
1.38
Returns
SignatureValidatorFactory

Definition at line 1813 of file MediaWikiServices.php.

◆ getSiteLookup()

MediaWiki\MediaWikiServices::getSiteLookup ( )
Since
1.27
Returns
SiteLookup

Definition at line 1821 of file MediaWikiServices.php.

◆ getSiteStore()

MediaWiki\MediaWikiServices::getSiteStore ( )
Since
1.27
Returns
SiteStore

Definition at line 1829 of file MediaWikiServices.php.

◆ getSkinFactory()

MediaWiki\MediaWikiServices::getSkinFactory ( )
Since
1.27
Returns
SkinFactory

Definition at line 1837 of file MediaWikiServices.php.

◆ getSlotRoleRegistry()

MediaWiki\MediaWikiServices::getSlotRoleRegistry ( )
Since
1.33
Returns
SlotRoleRegistry

Definition at line 1845 of file MediaWikiServices.php.

◆ getSlotRoleStore()

MediaWiki\MediaWikiServices::getSlotRoleStore ( )
Since
1.31
Returns
NameTableStore

Definition at line 1853 of file MediaWikiServices.php.

◆ getSpamChecker()

MediaWiki\MediaWikiServices::getSpamChecker ( )
Since
1.35
Returns
SpamChecker

Definition at line 1861 of file MediaWikiServices.php.

◆ getSpecialPageFactory()

MediaWiki\MediaWikiServices::getSpecialPageFactory ( )
Since
1.32
Returns
SpecialPageFactory

Definition at line 1869 of file MediaWikiServices.php.

◆ getStatsCache()

MediaWiki\MediaWikiServices::getStatsCache ( )
Since
1.41
Returns
StatsCache

Definition at line 1877 of file MediaWikiServices.php.

◆ getStatsdDataFactory()

MediaWiki\MediaWikiServices::getStatsdDataFactory ( )
Since
1.27
Returns
IBufferingStatsdDataFactory

Definition at line 1885 of file MediaWikiServices.php.

◆ getStatsFactory()

MediaWiki\MediaWikiServices::getStatsFactory ( )
Access: internal
Returns
StatsFactory

Definition at line 1893 of file MediaWikiServices.php.

◆ getTalkPageNotificationManager()

MediaWiki\MediaWikiServices::getTalkPageNotificationManager ( )
Since
1.35
Returns
TalkPageNotificationManager

Definition at line 1901 of file MediaWikiServices.php.

◆ getTempFSFileFactory()

MediaWiki\MediaWikiServices::getTempFSFileFactory ( )
Since
1.34
Returns
TempFSFileFactory

Definition at line 1909 of file MediaWikiServices.php.

◆ getTempUserConfig()

MediaWiki\MediaWikiServices::getTempUserConfig ( )
Since
1.39
Returns
RealTempUserConfig

Definition at line 1917 of file MediaWikiServices.php.

◆ getTempUserCreator()

MediaWiki\MediaWikiServices::getTempUserCreator ( )
Since
1.39
Returns
TempUserCreator

Definition at line 1925 of file MediaWikiServices.php.

◆ getTidy()

MediaWiki\MediaWikiServices::getTidy ( )
Since
1.36
Returns
TidyDriverBase

Definition at line 1933 of file MediaWikiServices.php.

◆ getTitleFactory()

MediaWiki\MediaWikiServices::getTitleFactory ( )
Since
1.35
Returns
TitleFactory

Definition at line 1941 of file MediaWikiServices.php.

◆ getTitleFormatter()

MediaWiki\MediaWikiServices::getTitleFormatter ( )
Since
1.28
Returns
TitleFormatter

Definition at line 1949 of file MediaWikiServices.php.

◆ getTitleMatcher()

MediaWiki\MediaWikiServices::getTitleMatcher ( )
Returns
TitleMatcher
Since
1.40

Definition at line 1957 of file MediaWikiServices.php.

◆ getTitleParser()

MediaWiki\MediaWikiServices::getTitleParser ( )
Since
1.28
Returns
TitleParser

Definition at line 1965 of file MediaWikiServices.php.

◆ getTrackingCategories()

MediaWiki\MediaWikiServices::getTrackingCategories ( )
Since
1.38
Returns
TrackingCategories

Definition at line 1973 of file MediaWikiServices.php.

◆ getUnblockUserFactory()

MediaWiki\MediaWikiServices::getUnblockUserFactory ( )
Since
1.36
Returns
UnblockUserFactory

Definition at line 1981 of file MediaWikiServices.php.

◆ getUndeletePageFactory()

MediaWiki\MediaWikiServices::getUndeletePageFactory ( )
Since
1.38
Returns
UndeletePageFactory

Definition at line 1989 of file MediaWikiServices.php.

◆ getUploadRevisionImporter()

MediaWiki\MediaWikiServices::getUploadRevisionImporter ( )
Since
1.32
Returns
UploadRevisionImporter

Definition at line 1997 of file MediaWikiServices.php.

◆ getUrlUtils()

MediaWiki\MediaWikiServices::getUrlUtils ( )
Since
1.39
Returns
UrlUtils

Definition at line 2005 of file MediaWikiServices.php.

◆ getUserCache()

MediaWiki\MediaWikiServices::getUserCache ( )
Since
1.36
Returns
UserCache

Definition at line 2013 of file MediaWikiServices.php.

◆ getUserEditTracker()

MediaWiki\MediaWikiServices::getUserEditTracker ( )
Since
1.35
Returns
UserEditTracker

Definition at line 2021 of file MediaWikiServices.php.

◆ getUserFactory()

MediaWiki\MediaWikiServices::getUserFactory ( )
Since
1.35
Returns
UserFactory

Definition at line 2029 of file MediaWikiServices.php.

◆ getUserGroupManager()

MediaWiki\MediaWikiServices::getUserGroupManager ( )
Since
1.35
Returns
UserGroupManager

Definition at line 2037 of file MediaWikiServices.php.

◆ getUserGroupManagerFactory()

MediaWiki\MediaWikiServices::getUserGroupManagerFactory ( )
Since
1.35
Returns
UserGroupManagerFactory

Definition at line 2045 of file MediaWikiServices.php.

◆ getUserIdentityLookup()

MediaWiki\MediaWikiServices::getUserIdentityLookup ( )
Since
1.36
Returns
UserIdentityLookup

Definition at line 2053 of file MediaWikiServices.php.

◆ getUserNamePrefixSearch()

MediaWiki\MediaWikiServices::getUserNamePrefixSearch ( )
Since
1.36
Returns
UserNamePrefixSearch

Definition at line 2061 of file MediaWikiServices.php.

◆ getUserNameUtils()

MediaWiki\MediaWikiServices::getUserNameUtils ( )
Since
1.35
Returns
UserNameUtils

Definition at line 2069 of file MediaWikiServices.php.

◆ getUserOptionsLookup()

MediaWiki\MediaWikiServices::getUserOptionsLookup ( )
Since
1.35
Returns
UserOptionsLookup

Definition at line 2077 of file MediaWikiServices.php.

◆ getUserOptionsManager()

MediaWiki\MediaWikiServices::getUserOptionsManager ( )
Since
1.35
Returns
UserOptionsManager

Definition at line 2085 of file MediaWikiServices.php.

◆ getVirtualRESTServiceClient()

MediaWiki\MediaWikiServices::getVirtualRESTServiceClient ( )
Since
1.28
Returns
VirtualRESTServiceClient

Definition at line 2093 of file MediaWikiServices.php.

◆ getWatchedItemQueryService()

MediaWiki\MediaWikiServices::getWatchedItemQueryService ( )
Since
1.28
Returns
WatchedItemQueryService

Definition at line 2101 of file MediaWikiServices.php.

◆ getWatchedItemStore()

MediaWiki\MediaWikiServices::getWatchedItemStore ( )
Since
1.28
Returns
WatchedItemStoreInterface

Definition at line 2109 of file MediaWikiServices.php.

◆ getWatchlistManager()

MediaWiki\MediaWikiServices::getWatchlistManager ( )
Since
1.36
Returns
WatchlistManager

Definition at line 2127 of file MediaWikiServices.php.

◆ getWatchlistNotificationManager()

MediaWiki\MediaWikiServices::getWatchlistNotificationManager ( )
Since
1.35
Returns
WatchlistManager
Deprecated
since 1.36 use getWatchlistManager() instead

Definition at line 2118 of file MediaWikiServices.php.

◆ getWikiExporterFactory()

MediaWiki\MediaWikiServices::getWikiExporterFactory ( )
Since
1.38
Returns
WikiExporterFactory

Definition at line 2135 of file MediaWikiServices.php.

◆ getWikiImporterFactory()

MediaWiki\MediaWikiServices::getWikiImporterFactory ( )
Since
1.37
Returns
WikiImporterFactory

Definition at line 2143 of file MediaWikiServices.php.

◆ getWikiPageFactory()

MediaWiki\MediaWikiServices::getWikiPageFactory ( )
Since
1.36
Returns
WikiPageFactory

Definition at line 2151 of file MediaWikiServices.php.

◆ getWikiRevisionOldRevisionImporter()

MediaWiki\MediaWikiServices::getWikiRevisionOldRevisionImporter ( )
Since
1.31
Returns
OldRevisionImporter

Definition at line 2159 of file MediaWikiServices.php.

◆ getWikiRevisionOldRevisionImporterNoUpdates()

MediaWiki\MediaWikiServices::getWikiRevisionOldRevisionImporterNoUpdates ( )
Since
1.31
Returns
OldRevisionImporter

Definition at line 2167 of file MediaWikiServices.php.

◆ getWikiRevisionUploadImporter()

MediaWiki\MediaWikiServices::getWikiRevisionUploadImporter ( )
Since
1.31
Returns
UploadRevisionImporter

Definition at line 2175 of file MediaWikiServices.php.

◆ getWRStatsFactory()

MediaWiki\MediaWikiServices::getWRStatsFactory ( )
Since
1.39
Returns
WRStatsFactory

Definition at line 2183 of file MediaWikiServices.php.

◆ hasInstance()

static MediaWiki\MediaWikiServices::hasInstance ( )
static

Returns true if an instance has already been initialized.

This can be used to avoid accessing services if it's not safe, such as in unit tests or early setup.

Returns
bool

Definition at line 270 of file MediaWikiServices.php.

Referenced by MediaWiki\Html\TemplateParser\getTemplate().

◆ isStorageDisabled()

MediaWiki\MediaWikiServices::isStorageDisabled ( )

Returns true if disableStorage() has been called on this MediaWikiServices instance.

Returns
bool

Definition at line 551 of file MediaWikiServices.php.

◆ newSearchEngine()

MediaWiki\MediaWikiServices::newSearchEngine ( )
Since
1.27
Returns
SearchEngine

Definition at line 1764 of file MediaWikiServices.php.

◆ resetChildProcessServices()

static MediaWiki\MediaWikiServices::resetChildProcessServices ( )
static

Resets any services that may have become stale after a child processö returns from after pcntl_fork().

It's also safe, but generally unnecessary, to call this method from the parent process.

Since
1.28
Note
This is intended for use in the context of process forking only!
See also
resetGlobalInstance()
disableStorage()

Definition at line 567 of file MediaWikiServices.php.

Referenced by MediaWiki\Maintenance\ForkController\prepareEnvironment().

◆ resetGlobalInstance()

static MediaWiki\MediaWikiServices::resetGlobalInstance ( Config $bootstrapConfig = null,
$quick = '' )
static

Creates a new instance of MediaWikiServices and sets it as the global default instance.

getInstance() will return a different MediaWikiServices object after every call to resetGlobalInstance().

Since
1.28
Warning
This should not be used during normal operation. It is intended for use when the configuration has changed significantly since bootstrap time, e.g. during the installation process or during testing. The method must not be called after MW_SERVICE_BOOTSTRAP_COMPLETE has been defined in Setup.php, unless MW_PHPUNIT_TEST or MEDIAWIKI_INSTALL or RUN_MAINTENANCE_IF_MAIN is defined).
Calling resetGlobalInstance() may leave the application in an inconsistent state. Calling this is only safe under the ASSUMPTION that NO REFERENCE to any of the services managed by MediaWikiServices exist. If any service objects managed by the old MediaWikiServices instance remain in use, they may INTERFERE with the operation of the services managed by the new MediaWikiServices. Operating with a mix of services created by the old and the new MediaWikiServices instance may lead to INCONSISTENCIES and even DATA LOSS! Any class implementing LAZY LOADING is especially prone to this problem, since instances would typically retain a reference to a storage layer service.
See also
forceGlobalInstance()
resetGlobalInstance()
resetBetweenTest()
Parameters
Config | null$bootstrapConfigThe Config object to be registered as the 'BootstrapConfig' service. This has to contain at least the information needed to set up the 'ConfigFactory' service. If not given, the bootstrap config of the old instance of MediaWikiServices will be re-used. If there was no previous instance, a new GlobalVarConfig object will be used to bootstrap the services.
string$quickSet this to "quick" to allow expensive resources to be re-used. See SalvageableService for details.

Definition at line 380 of file MediaWikiServices.php.

References $runner.

◆ resetServiceForTesting()

MediaWiki\MediaWikiServices::resetServiceForTesting ( $name,
$destroy = true )

Resets the given service for testing purposes.

Since
1.28
Warning
This is generally unsafe! Other services may still retain references to the stale service instance, leading to failures and inconsistencies. Subclasses may use this method to reset specific services under specific instances, but it should not be exposed to application logic.
Note
With proper dependency injection used throughout the codebase, this method should not be needed. It is provided to allow tests that pollute global service instances to clean up.
Parameters
string$name
bool$destroyWhether the service instance should be destroyed if it exists. When set to false, any existing service instance will effectively be detached from the container.

Definition at line 596 of file MediaWikiServices.php.


The documentation for this class was generated from the following file: