MediaWiki  master
MediaWikiServices.php
Go to the documentation of this file.
1 <?php
2 
3 namespace MediaWiki;
4 
6 use BagOStuff;
8 use CommentStore;
9 use Config;
10 use ConfigFactory;
12 use CryptHKDF;
18 use GenderCache;
19 use GlobalVarConfig;
22 use JobQueueGroup;
23 use JobRunner;
24 use Language;
25 use LinkCache;
26 use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface;
118 use MessageCache;
119 use MimeAnalyzer;
120 use MWException;
121 use NamespaceInfo;
122 use ObjectCache;
124 use PageProps;
125 use Parser;
126 use ParserCache;
127 use ParserFactory;
128 use PasswordFactory;
129 use PasswordReset;
130 use ProxyLookup;
131 use ReadOnlyMode;
132 use RepoGroup;
133 use ResourceLoader;
134 use SearchEngine;
137 use SiteLookup;
138 use SiteStore;
139 use SkinFactory;
140 use TitleFactory;
141 use TitleFormatter;
142 use TitleParser;
145 use UserCache;
147 use WANObjectCache;
153 use Wikimedia\NonSerializable\NonSerializableTrait;
154 use Wikimedia\ObjectFactory;
157 use Wikimedia\RequestTimeout\CriticalSectionProvider;
158 use Wikimedia\Services\NoSuchServiceException;
159 use Wikimedia\Services\SalvageableService;
160 use Wikimedia\Services\ServiceContainer;
162 
199 class MediaWikiServices extends ServiceContainer {
200  use NonSerializableTrait;
201 
205  private static $globalInstanceAllowed = false;
206 
210  private static $instance = null;
211 
223  public static function allowGlobalInstance() {
224  self::$globalInstanceAllowed = true;
225 
226  if ( self::$instance ) {
227  // TODO: in 1.37, getInstance() should fail if $globalInstanceAllowed is false! (T153256)
228  // Until then, we have to reset service instances that have already been created.
229  // No need to warn here, getService() has already triggered a deprecation warning.
230  self::resetGlobalInstance( null, 'quick' );
231  }
232  }
233 
240  public static function hasInstance() {
241  return self::$instance !== null;
242  }
243 
260  public static function getInstance(): self {
261  // TODO: in 1.37, getInstance() should fail if $globalInstanceAllowed is false! (T153256)
262  if ( !self::$globalInstanceAllowed ) {
263  wfDeprecatedMsg( 'Premature access to service container', '1.36' );
264  }
265 
266  if ( self::$instance === null ) {
267  // NOTE: constructing GlobalVarConfig here is not particularly pretty,
268  // but some information from the global scope has to be injected here,
269  // even if it's just a file name or database credentials to load
270  // configuration from.
271  $bootstrapConfig = new GlobalVarConfig();
272  self::$instance = self::newInstance( $bootstrapConfig, 'load' );
273 
274  // Provides a traditional hook point to allow extensions to configure services.
275  // NOTE: Ideally this would be in newInstance() but it causes an infinite run loop
276  $runner = new HookRunner( self::$instance->getHookContainer() );
277  $runner->onMediaWikiServices( self::$instance );
278  }
279  return self::$instance;
280  }
281 
282  public function getService( $name ) {
283  // TODO: in 1.37, getInstance() should fail if $globalInstanceAllowed is false! (T153256)
284  if ( !self::$globalInstanceAllowed && $this === self::$instance ) {
285  wfDeprecatedMsg( "Premature access to service '$name'", '1.36', false, 3 );
286  }
287 
288  return parent::getService( $name );
289  }
290 
304  public static function forceGlobalInstance( MediaWikiServices $services ) {
305  if ( !defined( 'MW_PHPUNIT_TEST' ) && !defined( 'MW_PARSER_TEST' ) ) {
306  throw new MWException( __METHOD__ . ' must not be used outside unit tests.' );
307  }
308 
309  $old = self::getInstance();
310  self::$instance = $services;
311 
312  return $old;
313  }
314 
354  public static function resetGlobalInstance( Config $bootstrapConfig = null, $quick = '' ) {
355  if ( self::$instance === null ) {
356  // no global instance yet, nothing to reset
357  return;
358  }
359 
360  self::failIfResetNotAllowed( __METHOD__ );
361 
362  if ( $bootstrapConfig === null ) {
363  $bootstrapConfig = self::$instance->getBootstrapConfig();
364  }
365 
366  $oldInstance = self::$instance;
367 
368  self::$instance = self::newInstance( $bootstrapConfig, 'load' );
369 
370  // Provides a traditional hook point to allow extensions to configure services.
371  $runner = new HookRunner( $oldInstance->getHookContainer() );
372  $runner->onMediaWikiServices( self::$instance );
373 
374  self::$instance->importWiring( $oldInstance, [ 'BootstrapConfig' ] );
375 
376  if ( $quick === 'quick' ) {
377  self::$instance->salvage( $oldInstance );
378  } else {
379  $oldInstance->destroy();
380  }
381  }
382 
392  private function salvage( self $other ) {
393  foreach ( $this->getServiceNames() as $name ) {
394  // The service could be new in the new instance and not registered in the
395  // other instance (e.g. an extension that was loaded after the instantiation of
396  // the other instance. Skip this service in this case. See T143974
397  try {
398  $oldService = $other->peekService( $name );
399  } catch ( NoSuchServiceException $e ) {
400  continue;
401  }
402 
403  if ( $oldService instanceof SalvageableService ) {
405  $newService = $this->getService( $name );
406  $newService->salvage( $oldService );
407  }
408  }
409 
410  $other->destroy();
411  }
412 
428  private static function newInstance( Config $bootstrapConfig, $loadWiring = '' ) {
429  $instance = new self( $bootstrapConfig );
430 
431  // Load the default wiring from the specified files.
432  if ( $loadWiring === 'load' ) {
433  $wiringFiles = $bootstrapConfig->get( 'ServiceWiringFiles' );
434  $instance->loadWiringFiles( $wiringFiles );
435  }
436 
437  return $instance;
438  }
439 
455  public static function disableStorageBackend() {
456  // TODO: also disable some Caches, JobQueues, etc
457  $destroy = [ 'DBLoadBalancer', 'DBLoadBalancerFactory' ];
458  $services = self::getInstance();
459 
460  foreach ( $destroy as $name ) {
461  $services->disableService( $name );
462  }
463 
465  }
466 
479  public static function resetChildProcessServices() {
480  // NOTE: for now, just reset everything. Since we don't know the interdependencies
481  // between services, we can't do this more selectively at this time.
482  self::resetGlobalInstance();
483 
484  // Child, reseed because there is no bug in PHP:
485  // https://bugs.php.net/bug.php?id=42465
486  mt_srand( getmypid() );
487  }
488 
510  public function resetServiceForTesting( $name, $destroy = true ) {
511  if ( !defined( 'MW_PHPUNIT_TEST' ) && !defined( 'MW_PARSER_TEST' ) ) {
512  throw new MWException( 'resetServiceForTesting() must not be used outside unit tests.' );
513  }
514 
515  $this->resetService( $name, $destroy );
516  }
517 
545  public static function failIfResetNotAllowed( $method ) {
546  if ( !defined( 'MW_PHPUNIT_TEST' )
547  && !defined( 'MW_PARSER_TEST' )
548  && !defined( 'MEDIAWIKI_INSTALL' )
549  && !defined( 'RUN_MAINTENANCE_IF_MAIN' )
550  && defined( 'MW_SERVICE_BOOTSTRAP_COMPLETE' )
551  ) {
552  throw new MWException( $method . ' may only be called during bootstrapping and unit tests!' );
553  }
554  }
555 
561  public function __construct( Config $config ) {
562  parent::__construct();
563 
564  // Register the given Config object as the bootstrap config service.
565  $this->defineService( 'BootstrapConfig', static function () use ( $config ) {
566  return $config;
567  } );
568  }
569 
570  // CONVENIENCE GETTERS ////////////////////////////////////////////////////
571 
576  public function getActionFactory(): ActionFactory {
577  return $this->getService( 'ActionFactory' );
578  }
579 
584  public function getActorMigration(): ActorMigration {
585  return $this->getService( 'ActorMigration' );
586  }
587 
592  public function getActorNormalization(): ActorNormalization {
593  return $this->getService( 'ActorNormalization' );
594  }
595 
600  public function getActorStore(): ActorStore {
601  return $this->getService( 'ActorStore' );
602  }
603 
608  public function getActorStoreFactory(): ActorStoreFactory {
609  return $this->getService( 'ActorStoreFactory' );
610  }
611 
616  public function getAuthManager(): AuthManager {
617  return $this->getService( 'AuthManager' );
618  }
619 
624  public function getBacklinkCacheFactory(): BacklinkCacheFactory {
625  return $this->getService( 'BacklinkCacheFactory' );
626  }
627 
632  public function getBadFileLookup(): BadFileLookup {
633  return $this->getService( 'BadFileLookup' );
634  }
635 
640  public function getBlobStore(): BlobStore {
641  return $this->getService( 'BlobStore' );
642  }
643 
648  public function getBlobStoreFactory(): BlobStoreFactory {
649  return $this->getService( 'BlobStoreFactory' );
650  }
651 
656  public function getBlockActionInfo(): BlockActionInfo {
657  return $this->getService( 'BlockActionInfo' );
658  }
659 
664  public function getBlockErrorFormatter(): BlockErrorFormatter {
665  return $this->getService( 'BlockErrorFormatter' );
666  }
667 
672  public function getBlockManager(): BlockManager {
673  return $this->getService( 'BlockManager' );
674  }
675 
680  public function getBlockPermissionCheckerFactory(): BlockPermissionCheckerFactory {
681  return $this->getService( 'BlockPermissionCheckerFactory' );
682  }
683 
688  public function getBlockRestrictionStore(): BlockRestrictionStore {
689  return $this->getService( 'BlockRestrictionStore' );
690  }
691 
696  public function getBlockUserFactory(): BlockUserFactory {
697  return $this->getService( 'BlockUserFactory' );
698  }
699 
704  public function getBlockUtils(): BlockUtils {
705  return $this->getService( 'BlockUtils' );
706  }
707 
721  public function getBootstrapConfig(): Config {
722  return $this->getService( 'BootstrapConfig' );
723  }
724 
729  public function getBotPasswordStore(): BotPasswordStore {
730  return $this->getService( 'BotPasswordStore' );
731  }
732 
737  public function getCentralIdLookup(): CentralIdLookup {
738  return $this->getService( 'CentralIdLookup' );
739  }
740 
745  public function getCentralIdLookupFactory(): CentralIdLookupFactory {
746  return $this->getService( 'CentralIdLookupFactory' );
747  }
748 
753  public function getChangeTagDefStore(): NameTableStore {
754  return $this->getService( 'ChangeTagDefStore' );
755  }
756 
761  public function getCollationFactory(): CollationFactory {
762  return $this->getService( 'CollationFactory' );
763  }
764 
769  public function getCommentFormatter(): CommentFormatter {
770  return $this->getService( 'CommentFormatter' );
771  }
772 
777  public function getCommentStore(): CommentStore {
778  return $this->getService( 'CommentStore' );
779  }
780 
785  public function getConfigFactory(): ConfigFactory {
786  return $this->getService( 'ConfigFactory' );
787  }
788 
793  public function getConfigRepository(): ConfigRepository {
794  return $this->getService( 'ConfigRepository' );
795  }
796 
802  return $this->getService( 'ConfiguredReadOnlyMode' );
803  }
804 
809  public function getContentHandlerFactory(): IContentHandlerFactory {
810  return $this->getService( 'ContentHandlerFactory' );
811  }
812 
817  public function getContentLanguage(): Language {
818  return $this->getService( 'ContentLanguage' );
819  }
820 
825  public function getContentModelChangeFactory(): ContentModelChangeFactory {
826  return $this->getService( 'ContentModelChangeFactory' );
827  }
828 
833  public function getContentModelStore(): NameTableStore {
834  return $this->getService( 'ContentModelStore' );
835  }
836 
841  public function getContentRenderer(): ContentRenderer {
842  return $this->getService( 'ContentRenderer' );
843  }
844 
849  public function getContentTransformer(): ContentTransformer {
850  return $this->getService( 'ContentTransformer' );
851  }
852 
857  public function getContributionsLookup(): ContributionsLookup {
858  return $this->getService( 'ContributionsLookup' );
859  }
860 
865  public function getCriticalSectionProvider(): CriticalSectionProvider {
866  return $this->getService( 'CriticalSectionProvider' );
867  }
868 
873  public function getCryptHKDF(): CryptHKDF {
874  return $this->getService( 'CryptHKDF' );
875  }
876 
881  public function getDatabaseBlockStore(): DatabaseBlockStore {
882  return $this->getService( 'DatabaseBlockStore' );
883  }
884 
890  return $this->getService( 'DateFormatterFactory' );
891  }
892 
897  public function getDBLoadBalancer(): ILoadBalancer {
898  return $this->getService( 'DBLoadBalancer' );
899  }
900 
905  public function getDBLoadBalancerFactory(): LBFactory {
906  return $this->getService( 'DBLoadBalancerFactory' );
907  }
908 
913  public function getDeletePageFactory(): DeletePageFactory {
914  return $this->getService( 'DeletePageFactory' );
915  }
916 
921  public function getEmailer(): IEmailer {
922  return $this->getService( 'Emailer' );
923  }
924 
930  return $this->getService( 'EventRelayerGroup' );
931  }
932 
938  return $this->getService( 'ExternalStoreAccess' );
939  }
940 
946  return $this->getService( 'ExternalStoreFactory' );
947  }
948 
954  return $this->getService( 'FileBackendGroup' );
955  }
956 
961  public function getGenderCache(): GenderCache {
962  return $this->getService( 'GenderCache' );
963  }
964 
969  public function getGlobalIdGenerator(): GlobalIdGenerator {
970  return $this->getService( 'GlobalIdGenerator' );
971  }
972 
977  public function getGrantsInfo(): GrantsInfo {
978  return $this->getService( 'GrantsInfo' );
979  }
980 
985  public function getGrantsLocalization(): GrantsLocalization {
986  return $this->getService( 'GrantsLocalization' );
987  }
988 
993  public function getGroupPermissionsLookup(): GroupPermissionsLookup {
994  return $this->getService( 'GroupPermissionsLookup' );
995  }
996 
1001  public function getHookContainer(): HookContainer {
1002  return $this->getService( 'HookContainer' );
1003  }
1004 
1010  return $this->getService( 'HtmlCacheUpdater' );
1011  }
1012 
1017  public function getHttpRequestFactory(): HttpRequestFactory {
1018  return $this->getService( 'HttpRequestFactory' );
1019  }
1020 
1025  public function getInterwikiLookup(): InterwikiLookup {
1026  return $this->getService( 'InterwikiLookup' );
1027  }
1028 
1033  public function getJobQueueGroup(): JobQueueGroup {
1034  return $this->getService( 'JobQueueGroup' );
1035  }
1036 
1041  public function getJobQueueGroupFactory(): JobQueueGroupFactory {
1042  return $this->getService( 'JobQueueGroupFactory' );
1043  }
1044 
1049  public function getJobRunner(): JobRunner {
1050  return $this->getService( 'JobRunner' );
1051  }
1052 
1057  public function getJsonCodec(): JsonCodec {
1058  return $this->getService( 'JsonCodec' );
1059  }
1060 
1065  public function getLanguageConverterFactory(): LanguageConverterFactory {
1066  return $this->getService( 'LanguageConverterFactory' );
1067  }
1068 
1073  public function getLanguageFactory(): LanguageFactory {
1074  return $this->getService( 'LanguageFactory' );
1075  }
1076 
1081  public function getLanguageFallback(): LanguageFallback {
1082  return $this->getService( 'LanguageFallback' );
1083  }
1084 
1089  public function getLanguageNameUtils(): LanguageNameUtils {
1090  return $this->getService( 'LanguageNameUtils' );
1091  }
1092 
1097  public function getLinkBatchFactory(): LinkBatchFactory {
1098  return $this->getService( 'LinkBatchFactory' );
1099  }
1100 
1105  public function getLinkCache(): LinkCache {
1106  return $this->getService( 'LinkCache' );
1107  }
1108 
1116  public function getLinkRenderer(): LinkRenderer {
1117  return $this->getService( 'LinkRenderer' );
1118  }
1119 
1124  public function getLinkRendererFactory(): LinkRendererFactory {
1125  return $this->getService( 'LinkRendererFactory' );
1126  }
1127 
1133  return $this->getService( 'LocalisationCache' );
1134  }
1135 
1146  return $this->getService( 'LocalServerObjectCache' );
1147  }
1148 
1153  public function getLockManagerGroupFactory(): LockManagerGroupFactory {
1154  return $this->getService( 'LockManagerGroupFactory' );
1155  }
1156 
1162  return $this->getService( 'MagicWordFactory' );
1163  }
1164 
1172  public function getMainConfig(): Config {
1173  return $this->getService( 'MainConfig' );
1174  }
1175 
1184  public function getMainObjectStash(): BagOStuff {
1185  return $this->getService( 'MainObjectStash' );
1186  }
1187 
1197  return $this->getService( 'MainWANObjectCache' );
1198  }
1199 
1205  return $this->getService( 'MediaHandlerFactory' );
1206  }
1207 
1212  public function getMergeHistoryFactory(): MergeHistoryFactory {
1213  return $this->getService( 'MergeHistoryFactory' );
1214  }
1215 
1220  public function getMessageCache(): MessageCache {
1221  return $this->getService( 'MessageCache' );
1222  }
1223 
1228  public function getMessageFormatterFactory(): IMessageFormatterFactory {
1229  return $this->getService( 'MessageFormatterFactory' );
1230  }
1231 
1236  public function getMetricsFactory(): MetricsFactory {
1237  return $this->getService( 'MetricsFactory' );
1238  }
1239 
1244  public function getMimeAnalyzer(): MimeAnalyzer {
1245  return $this->getService( 'MimeAnalyzer' );
1246  }
1247 
1252  public function getMovePageFactory(): MovePageFactory {
1253  return $this->getService( 'MovePageFactory' );
1254  }
1255 
1260  public function getNamespaceInfo(): NamespaceInfo {
1261  return $this->getService( 'NamespaceInfo' );
1262  }
1263 
1268  public function getNameTableStoreFactory(): NameTableStoreFactory {
1269  return $this->getService( 'NameTableStoreFactory' );
1270  }
1271 
1279  public function getObjectFactory(): ObjectFactory {
1280  return $this->getService( 'ObjectFactory' );
1281  }
1282 
1288  return $this->getService( 'OldRevisionImporter' );
1289  }
1290 
1295  public function getPageEditStash(): PageEditStash {
1296  return $this->getService( 'PageEditStash' );
1297  }
1298 
1303  public function getPageProps(): PageProps {
1304  return $this->getService( 'PageProps' );
1305  }
1306 
1311  public function getPageStore(): PageStore {
1312  return $this->getService( 'PageStore' );
1313  }
1314 
1319  public function getPageStoreFactory(): PageStoreFactory {
1320  return $this->getService( 'PageStoreFactory' );
1321  }
1322 
1327  public function getPageUpdaterFactory(): PageUpdaterFactory {
1328  return $this->getService( 'PageUpdaterFactory' );
1329  }
1330 
1335  public function getParser(): Parser {
1336  return $this->getService( 'Parser' );
1337  }
1338 
1343  public function getParserCache(): ParserCache {
1344  return $this->getService( 'ParserCache' );
1345  }
1346 
1351  public function getParserCacheFactory(): ParserCacheFactory {
1352  return $this->getService( 'ParserCacheFactory' );
1353  }
1354 
1359  public function getParserFactory(): ParserFactory {
1360  return $this->getService( 'ParserFactory' );
1361  }
1362 
1367  public function getParserOutputAccess(): ParserOutputAccess {
1368  return $this->getService( 'ParserOutputAccess' );
1369  }
1370 
1376  return $this->getService( 'PasswordFactory' );
1377  }
1378 
1383  public function getPasswordReset(): PasswordReset {
1384  return $this->getService( 'PasswordReset' );
1385  }
1386 
1391  public function getPerDbNameStatsdDataFactory(): StatsdDataFactoryInterface {
1392  return $this->getService( 'PerDbNameStatsdDataFactory' );
1393  }
1394 
1399  public function getPermissionManager(): PermissionManager {
1400  return $this->getService( 'PermissionManager' );
1401  }
1402 
1407  public function getPreferencesFactory(): PreferencesFactory {
1408  return $this->getService( 'PreferencesFactory' );
1409  }
1410 
1415  public function getProxyLookup(): ProxyLookup {
1416  return $this->getService( 'ProxyLookup' );
1417  }
1418 
1423  public function getReadOnlyMode(): ReadOnlyMode {
1424  return $this->getService( 'ReadOnlyMode' );
1425  }
1426 
1431  public function getRepoGroup(): RepoGroup {
1432  return $this->getService( 'RepoGroup' );
1433  }
1434 
1439  public function getResourceLoader(): ResourceLoader {
1440  return $this->getService( 'ResourceLoader' );
1441  }
1442 
1447  public function getRestrictionStore(): RestrictionStore {
1448  return $this->getService( 'RestrictionStore' );
1449  }
1450 
1455  public function getRevertedTagUpdateManager(): RevertedTagUpdateManager {
1456  return $this->getService( 'RevertedTagUpdateManager' );
1457  }
1458 
1463  public function getRevisionFactory(): RevisionFactory {
1464  return $this->getService( 'RevisionFactory' );
1465  }
1466 
1471  public function getRevisionLookup(): RevisionLookup {
1472  return $this->getService( 'RevisionLookup' );
1473  }
1474 
1479  public function getRevisionRenderer(): RevisionRenderer {
1480  return $this->getService( 'RevisionRenderer' );
1481  }
1482 
1487  public function getRevisionStore(): RevisionStore {
1488  return $this->getService( 'RevisionStore' );
1489  }
1490 
1495  public function getRevisionStoreFactory(): RevisionStoreFactory {
1496  return $this->getService( 'RevisionStoreFactory' );
1497  }
1498 
1503  public function getRollbackPageFactory(): RollbackPageFactory {
1504  return $this->getService( 'RollbackPageFactory' );
1505  }
1506 
1511  public function getRowCommentFormatter(): RowCommentFormatter {
1512  return $this->getService( 'RowCommentFormatter' );
1513  }
1514 
1519  public function newSearchEngine(): SearchEngine {
1520  // New engine object every time, since they keep state
1521  return $this->getService( 'SearchEngineFactory' )->create();
1522  }
1523 
1529  return $this->getService( 'SearchEngineConfig' );
1530  }
1531 
1537  return $this->getService( 'SearchEngineFactory' );
1538  }
1539 
1544  public function getShellboxClientFactory(): ShellboxClientFactory {
1545  return $this->getService( 'ShellboxClientFactory' );
1546  }
1547 
1552  public function getShellCommandFactory(): CommandFactory {
1553  return $this->getService( 'ShellCommandFactory' );
1554  }
1555 
1560  public function getSiteLookup(): SiteLookup {
1561  return $this->getService( 'SiteLookup' );
1562  }
1563 
1568  public function getSiteStore(): SiteStore {
1569  return $this->getService( 'SiteStore' );
1570  }
1571 
1576  public function getSkinFactory(): SkinFactory {
1577  return $this->getService( 'SkinFactory' );
1578  }
1579 
1584  public function getSlotRoleRegistry(): SlotRoleRegistry {
1585  return $this->getService( 'SlotRoleRegistry' );
1586  }
1587 
1592  public function getSlotRoleStore(): NameTableStore {
1593  return $this->getService( 'SlotRoleStore' );
1594  }
1595 
1600  public function getSpamChecker(): SpamChecker {
1601  return $this->getService( 'SpamChecker' );
1602  }
1603 
1608  public function getSpecialPageFactory(): SpecialPageFactory {
1609  return $this->getService( 'SpecialPageFactory' );
1610  }
1611 
1617  return $this->getService( 'StatsdDataFactory' );
1618  }
1619 
1624  public function getTalkPageNotificationManager(): TalkPageNotificationManager {
1625  return $this->getService( 'TalkPageNotificationManager' );
1626  }
1627 
1632  public function getTempFSFileFactory(): TempFSFileFactory {
1633  return $this->getService( 'TempFSFileFactory' );
1634  }
1635 
1640  public function getTidy(): TidyDriverBase {
1641  return $this->getService( 'Tidy' );
1642  }
1643 
1648  public function getTitleFactory(): TitleFactory {
1649  return $this->getService( 'TitleFactory' );
1650  }
1651 
1656  public function getTitleFormatter(): TitleFormatter {
1657  return $this->getService( 'TitleFormatter' );
1658  }
1659 
1664  public function getTitleParser(): TitleParser {
1665  return $this->getService( 'TitleParser' );
1666  }
1667 
1673  return $this->getService( 'TrackingCategories' );
1674  }
1675 
1680  public function getUnblockUserFactory(): UnblockUserFactory {
1681  return $this->getService( 'UnblockUserFactory' );
1682  }
1683 
1688  public function getUndeletePageFactory(): UndeletePageFactory {
1689  return $this->getService( 'UndeletePageFactory' );
1690  }
1691 
1697  return $this->getService( 'UploadRevisionImporter' );
1698  }
1699 
1704  public function getUserCache(): UserCache {
1705  return $this->getService( 'UserCache' );
1706  }
1707 
1712  public function getUserEditTracker(): UserEditTracker {
1713  return $this->getService( 'UserEditTracker' );
1714  }
1715 
1720  public function getUserFactory(): UserFactory {
1721  return $this->getService( 'UserFactory' );
1722  }
1723 
1728  public function getUserGroupManager(): UserGroupManager {
1729  return $this->getService( 'UserGroupManager' );
1730  }
1731 
1736  public function getUserGroupManagerFactory(): UserGroupManagerFactory {
1737  return $this->getService( 'UserGroupManagerFactory' );
1738  }
1739 
1744  public function getUserIdentityLookup(): UserIdentityLookup {
1745  return $this->getService( 'UserIdentityLookup' );
1746  }
1747 
1753  return $this->getService( 'UserNamePrefixSearch' );
1754  }
1755 
1760  public function getUserNameUtils(): UserNameUtils {
1761  return $this->getService( 'UserNameUtils' );
1762  }
1763 
1768  public function getUserOptionsLookup(): UserOptionsLookup {
1769  return $this->getService( 'UserOptionsLookup' );
1770  }
1771 
1776  public function getUserOptionsManager(): UserOptionsManager {
1777  return $this->getService( 'UserOptionsManager' );
1778  }
1779 
1785  return $this->getService( 'VirtualRESTServiceClient' );
1786  }
1787 
1793  return $this->getService( 'WatchedItemQueryService' );
1794  }
1795 
1801  return $this->getService( 'WatchedItemStore' );
1802  }
1803 
1809  public function getWatchlistNotificationManager(): WatchlistManager {
1810  wfDeprecated( __METHOD__, '1.36' );
1811  return $this->getWatchlistManager();
1812  }
1813 
1818  public function getWatchlistManager(): WatchlistManager {
1819  return $this->getService( 'WatchlistManager' );
1820  }
1821 
1826  public function getWikiExporterFactory(): WikiExporterFactory {
1827  return $this->getService( 'WikiExporterFactory' );
1828  }
1829 
1835  return $this->getService( 'WikiImporterFactory' );
1836  }
1837 
1842  public function getWikiPageFactory(): WikiPageFactory {
1843  return $this->getService( 'WikiPageFactory' );
1844  }
1845 
1851  return $this->getService( 'OldRevisionImporter' );
1852  }
1853 
1859  return $this->getService( 'WikiRevisionOldRevisionImporterNoUpdates' );
1860  }
1861 
1867  return $this->getService( 'UploadRevisionImporter' );
1868  }
1869 
1870 }
MediaWiki\MediaWikiServices\getJobQueueGroup
getJobQueueGroup()
Definition: MediaWikiServices.php:1033
EventRelayerGroup
Factory class for spawning EventRelayer objects using configuration.
Definition: EventRelayerGroup.php:26
MediaWiki\MediaWikiServices\getMessageCache
getMessageCache()
Definition: MediaWikiServices.php:1220
MediaWiki\MediaWikiServices\getBlockErrorFormatter
getBlockErrorFormatter()
Definition: MediaWikiServices.php:664
ObjectCache\clear
static clear()
Clear all the cached instances.
Definition: ObjectCache.php:282
ObjectCache
Functions to get cache objects.
Definition: ObjectCache.php:64
LinkCache
Cache for article titles (prefixed DB keys) and ids linked from one source.
Definition: LinkCache.php:40
MediaWiki\MediaWikiServices\getShellCommandFactory
getShellCommandFactory()
Definition: MediaWikiServices.php:1552
MediaWiki\Block\BlockPermissionCheckerFactory
Factory class for BlockPermissionChecker.
Definition: BlockPermissionCheckerFactory.php:33
Wikimedia\Metrics\MetricsFactory
Definition: MetricsFactory.php:40
MediaWiki\MediaWikiServices\getInterwikiLookup
getInterwikiLookup()
Definition: MediaWikiServices.php:1025
MediaWiki\Block\BlockUserFactory
Definition: BlockUserFactory.php:30
MediaWiki\MediaWikiServices\getSpamChecker
getSpamChecker()
Definition: MediaWikiServices.php:1600
MediaWiki\MediaWikiServices\getResourceLoader
getResourceLoader()
Definition: MediaWikiServices.php:1439
MediaWiki\MediaWikiServices\getSearchEngineConfig
getSearchEngineConfig()
Definition: MediaWikiServices.php:1528
UploadRevisionImporter
Definition: UploadRevisionImporter.php:6
Wikimedia\UUID\GlobalIdGenerator
Class for getting statistically unique IDs without a central coordinator.
Definition: GlobalIdGenerator.php:34
FileBackendGroup
Class to handle file backend registration.
Definition: FileBackendGroup.php:36
MediaWiki\MediaWikiServices\getCentralIdLookup
getCentralIdLookup()
Definition: MediaWikiServices.php:737
MagicWordFactory
A factory that stores information about MagicWords, and creates them on demand with caching.
Definition: MagicWordFactory.php:37
MediaWiki\MediaWikiServices\getSiteLookup
getSiteLookup()
Definition: MediaWikiServices.php:1560
MediaWiki\MediaWikiServices\getParserFactory
getParserFactory()
Definition: MediaWikiServices.php:1359
MediaWiki\MediaWikiServices\getBlockManager
getBlockManager()
Definition: MediaWikiServices.php:672
MediaWiki\MediaWikiServices\getJobRunner
getJobRunner()
Definition: MediaWikiServices.php:1049
UserCache
Definition: UserCache.php:32
MediaWiki\Block\BlockManager
A service class for checking blocks.
Definition: BlockManager.php:47
MediaWiki\MediaWikiServices\getBlockRestrictionStore
getBlockRestrictionStore()
Definition: MediaWikiServices.php:688
MediaWiki\MediaWikiServices\getDBLoadBalancer
getDBLoadBalancer()
Definition: MediaWikiServices.php:897
MediaWiki\Permissions\GroupPermissionsLookup
Definition: GroupPermissionsLookup.php:30
MediaWiki\MediaWikiServices\getRollbackPageFactory
getRollbackPageFactory()
Definition: MediaWikiServices.php:1503
MediaWiki\MediaWikiServices
MediaWikiServices is the service locator for the application scope of MediaWiki.
Definition: MediaWikiServices.php:199
MimeAnalyzer
Implements functions related to MIME types such as detection and mapping to file extension.
Definition: MimeAnalyzer.php:33
Page\ParserOutputAccess
Service for getting rendered output of a given page.
Definition: ParserOutputAccess.php:50
MediaWiki\Revision\RevisionStore
Service for looking up page revisions.
Definition: RevisionStore.php:88
MediaWiki\MediaWikiServices\getCollationFactory
getCollationFactory()
Definition: MediaWikiServices.php:761
MediaWiki\Block\BlockErrorFormatter
A service class for getting formatted information about a block.
Definition: BlockErrorFormatter.php:36
MediaWiki\Http\HttpRequestFactory
Factory creating MWHttpRequest objects.
Definition: HttpRequestFactory.php:39
MediaWiki\MediaWikiServices\getContentModelStore
getContentModelStore()
Definition: MediaWikiServices.php:833
MediaWiki\MediaWikiServices\getChangeTagDefStore
getChangeTagDefStore()
Definition: MediaWikiServices.php:753
MediaWiki\MediaWikiServices\getLanguageConverterFactory
getLanguageConverterFactory()
Definition: MediaWikiServices.php:1065
MediaWiki\Languages\LanguageFactory
Internationalisation code See https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation for more...
Definition: LanguageFactory.php:42
MediaWiki\Linker\LinkRenderer
Class that generates HTML links for pages.
Definition: LinkRenderer.php:43
MediaWiki\MediaWikiServices\getBlockPermissionCheckerFactory
getBlockPermissionCheckerFactory()
Definition: MediaWikiServices.php:680
MediaWiki\MediaWikiServices\getRevisionLookup
getRevisionLookup()
Definition: MediaWikiServices.php:1471
MediaWiki\Block\BlockUtils
Backend class for blocking utils.
Definition: BlockUtils.php:45
MediaWiki\SpecialPage\SpecialPageFactory
Factory for handling the special page list and generating SpecialPage objects.
Definition: SpecialPageFactory.php:63
ReadOnlyMode
A service class for fetching the wiki's current read-only mode.
Definition: ReadOnlyMode.php:11
MediaWiki\MediaWikiServices\getWatchlistManager
getWatchlistManager()
Definition: MediaWikiServices.php:1818
MediaWiki\MediaWikiServices\getContentTransformer
getContentTransformer()
Definition: MediaWikiServices.php:849
MediaWiki\MediaWikiServices\getActorStoreFactory
getActorStoreFactory()
Definition: MediaWikiServices.php:608
MediaWiki\MediaWikiServices\getBootstrapConfig
getBootstrapConfig()
Returns the Config object containing the bootstrap configuration.
Definition: MediaWikiServices.php:721
MediaWiki\FileBackend\LockManager\LockManagerGroupFactory
Service to construct LockManagerGroups.
Definition: LockManagerGroupFactory.php:11
MediaWiki\MediaWikiServices\getCommentStore
getCommentStore()
Definition: MediaWikiServices.php:777
MediaWiki\MediaWikiServices\getGlobalIdGenerator
getGlobalIdGenerator()
Definition: MediaWikiServices.php:969
MediaWiki\MediaWikiServices\getPageUpdaterFactory
getPageUpdaterFactory()
Definition: MediaWikiServices.php:1327
MediaWiki\MediaWikiServices\getSlotRoleStore
getSlotRoleStore()
Definition: MediaWikiServices.php:1592
Page\RollbackPageFactory
Definition: RollbackPageFactory.php:32
GenderCache
Caches user genders when needed to use correct namespace aliases.
Definition: GenderCache.php:36
MediaWiki\Languages\LanguageFallback
Definition: LanguageFallback.php:31
ConfiguredReadOnlyMode
A read-only mode service which does not depend on LoadBalancer.
Definition: ConfiguredReadOnlyMode.php:9
CommentStore
Handle database storage of comments such as edit summaries and log reasons.
Definition: CommentStore.php:42
MediaWiki\MediaWikiServices\getExternalStoreAccess
getExternalStoreAccess()
Definition: MediaWikiServices.php:937
MediaWiki\MediaWikiServices\getUserNamePrefixSearch
getUserNamePrefixSearch()
Definition: MediaWikiServices.php:1752
MediaWiki\MediaWikiServices\getBacklinkCacheFactory
getBacklinkCacheFactory()
Definition: MediaWikiServices.php:624
MediaWiki\MediaWikiServices\getUserOptionsManager
getUserOptionsManager()
Definition: MediaWikiServices.php:1776
BagOStuff
Class representing a cache/ephemeral data store.
Definition: BagOStuff.php:86
MediaWiki\Linker\LinkRendererFactory
Factory to create LinkRender objects.
Definition: LinkRendererFactory.php:34
SearchEngineFactory
Factory class for SearchEngine.
Definition: SearchEngineFactory.php:12
MediaWiki\Revision\RevisionFactory
Service for constructing RevisionRecord objects.
Definition: RevisionFactory.php:37
MediaWiki\MediaWikiServices\getTrackingCategories
getTrackingCategories()
Definition: MediaWikiServices.php:1672
MediaWiki\MediaWikiServices\getActorMigration
getActorMigration()
Definition: MediaWikiServices.php:584
MediaWiki\MediaWikiServices\getJsonCodec
getJsonCodec()
Definition: MediaWikiServices.php:1057
ActorMigration
This is not intended to be a long-term part of MediaWiki; it will be deprecated and removed once acto...
Definition: ActorMigration.php:15
MediaWiki\MediaWikiServices\getBlockUtils
getBlockUtils()
Definition: MediaWikiServices.php:704
MediaWiki\MediaWikiServices\getWikiPageFactory
getWikiPageFactory()
Definition: MediaWikiServices.php:1842
MediaWiki\Block\DatabaseBlockStore
Definition: DatabaseBlockStore.php:47
Parser\ParserCacheFactory
Definition: ParserCacheFactory.php:40
MediaWiki\MediaWikiServices\getPermissionManager
getPermissionManager()
Definition: MediaWikiServices.php:1399
MediaWiki\MediaWikiServices\getLanguageFallback
getLanguageFallback()
Definition: MediaWikiServices.php:1081
MediaWiki\MediaWikiServices\getGenderCache
getGenderCache()
Definition: MediaWikiServices.php:961
MediaWiki\CommentFormatter\CommentFormatter
This is the main service interface for converting single-line comments from various DB comment fields...
Definition: CommentFormatter.php:16
MediaWiki\User\ActorStoreFactory
Definition: ActorStoreFactory.php:35
MediaWiki\MediaWikiServices\getEventRelayerGroup
getEventRelayerGroup()
Definition: MediaWikiServices.php:929
MediaWiki\MediaWikiServices\getLockManagerGroupFactory
getLockManagerGroupFactory()
Definition: MediaWikiServices.php:1153
MediaWiki\Languages\LanguageConverterFactory
An interface for creating language converters.
Definition: LanguageConverterFactory.php:46
SiteLookup
Definition: SiteLookup.php:28
MediaWiki\Revision\RevisionLookup
Service for looking up page revisions.
Definition: RevisionLookup.php:38
MediaWiki\MediaWikiServices\getCentralIdLookupFactory
getCentralIdLookupFactory()
Definition: MediaWikiServices.php:745
ExternalStoreAccess
Key/value blob storage for a collection of storage medium types (e.g.
Definition: ExternalStoreAccess.php:22
MediaHandlerFactory
Class to construct MediaHandler objects.
Definition: MediaHandlerFactory.php:31
MediaWiki\MediaWikiServices\getActionFactory
getActionFactory()
Definition: MediaWikiServices.php:576
MediaWiki\User\TalkPageNotificationManager
Manages user talk page notifications.
Definition: TalkPageNotificationManager.php:35
MediaWiki\MediaWikiServices\getOldRevisionImporter
getOldRevisionImporter()
Definition: MediaWikiServices.php:1287
MediaWiki\MediaWikiServices\getRowCommentFormatter
getRowCommentFormatter()
Definition: MediaWikiServices.php:1511
MediaWiki\MediaWikiServices\getPasswordReset
getPasswordReset()
Definition: MediaWikiServices.php:1383
MediaWiki\Languages\LanguageNameUtils
A service that provides utilities to do with language names and codes.
Definition: LanguageNameUtils.php:42
MediaWiki\MediaWikiServices\getUploadRevisionImporter
getUploadRevisionImporter()
Definition: MediaWikiServices.php:1696
MediaWiki\MediaWikiServices\getContentRenderer
getContentRenderer()
Definition: MediaWikiServices.php:841
MediaWiki\MediaWikiServices\getProxyLookup
getProxyLookup()
Definition: MediaWikiServices.php:1415
MediaWiki\MediaWikiServices\getSkinFactory
getSkinFactory()
Definition: MediaWikiServices.php:1576
SiteStore
Definition: SiteStore.php:29
MediaWiki\MediaWikiServices\failIfResetNotAllowed
static failIfResetNotAllowed( $method)
Convenience method that throws an exception unless it is called during a phase in which resetting of ...
Definition: MediaWikiServices.php:545
MediaWiki\MediaWikiServices\getUserCache
getUserCache()
Definition: MediaWikiServices.php:1704
MediaWiki\MediaWikiServices\getInstance
static getInstance()
Returns the global default instance of the top level service locator.
Definition: MediaWikiServices.php:260
MediaWiki\MediaWikiServices\getWikiImporterFactory
getWikiImporterFactory()
Definition: MediaWikiServices.php:1834
MediaWiki\Export\WikiExporterFactory
Factory service for WikiExporter instances.
Definition: WikiExporterFactory.php:35
MediaWiki\MediaWikiServices\getLocalisationCache
getLocalisationCache()
Definition: MediaWikiServices.php:1132
Config
Interface for configuration instances.
Definition: Config.php:30
MediaWiki\User\UserGroupManager
Managers user groups.
Definition: UserGroupManager.php:52
MediaWiki\MediaWikiServices\getJobQueueGroupFactory
getJobQueueGroupFactory()
Definition: MediaWikiServices.php:1041
Page\MergeHistoryFactory
Definition: MergeHistoryFactory.php:30
MediaWiki\MediaWikiServices\getSpecialPageFactory
getSpecialPageFactory()
Definition: MediaWikiServices.php:1608
MediaWiki\MediaWikiServices\getAuthManager
getAuthManager()
Definition: MediaWikiServices.php:616
MediaWiki\MediaWikiServices\getMagicWordFactory
getMagicWordFactory()
Definition: MediaWikiServices.php:1161
MediaWiki\MediaWikiServices\getPerDbNameStatsdDataFactory
getPerDbNameStatsdDataFactory()
Definition: MediaWikiServices.php:1391
wfDeprecatedMsg
wfDeprecatedMsg( $msg, $version=false, $component=false, $callerOffset=2)
Log a deprecation warning with arbitrary message text.
Definition: GlobalFunctions.php:1028
MWException
MediaWiki exception.
Definition: MWException.php:29
MediaWiki\MediaWikiServices\resetServiceForTesting
resetServiceForTesting( $name, $destroy=true)
Resets the given service for testing purposes.
Definition: MediaWikiServices.php:510
MediaWiki\MediaWikiServices\getCryptHKDF
getCryptHKDF()
Definition: MediaWikiServices.php:873
wfDeprecated
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Logs a warning that a deprecated feature was used.
Definition: GlobalFunctions.php:997
MediaWiki\MediaWikiServices\resetGlobalInstance
static resetGlobalInstance(Config $bootstrapConfig=null, $quick='')
Creates a new instance of MediaWikiServices and sets it as the global default instance.
Definition: MediaWikiServices.php:354
MediaWiki\MediaWikiServices\getTempFSFileFactory
getTempFSFileFactory()
Definition: MediaWikiServices.php:1632
MediaWiki\MediaWikiServices\getWatchedItemStore
getWatchedItemStore()
Definition: MediaWikiServices.php:1800
MediaWiki\Storage\PageEditStash
Class for managing stashed edits used by the page updater classes.
Definition: PageEditStash.php:49
DateFormatterFactory
Definition: DateFormatterFactory.php:3
MediaWiki\Watchlist\WatchlistManager
WatchlistManager service.
Definition: WatchlistManager.php:52
MediaWiki\MediaWikiServices\getContentHandlerFactory
getContentHandlerFactory()
Definition: MediaWikiServices.php:809
MediaWiki\MediaWikiServices\getMediaHandlerFactory
getMediaHandlerFactory()
Definition: MediaWikiServices.php:1204
Config\get
get( $name)
Get a configuration variable such as "Sitename" or "UploadMaintenance.".
MediaWiki\MediaWikiServices\getRevertedTagUpdateManager
getRevertedTagUpdateManager()
Definition: MediaWikiServices.php:1455
CryptHKDF
Definition: CryptHKDF.php:33
MediaWiki\MediaWikiServices\getWatchedItemQueryService
getWatchedItemQueryService()
Definition: MediaWikiServices.php:1792
MediaWiki\MediaWikiServices\getUserEditTracker
getUserEditTracker()
Definition: MediaWikiServices.php:1712
MediaWiki\Cache\LinkBatchFactory
Definition: LinkBatchFactory.php:39
MediaWiki\MediaWikiServices\getUserFactory
getUserFactory()
Definition: MediaWikiServices.php:1720
MediaWiki\MediaWikiServices\getMergeHistoryFactory
getMergeHistoryFactory()
Definition: MediaWikiServices.php:1212
MediaWiki\MediaWikiServices\getTitleParser
getTitleParser()
Definition: MediaWikiServices.php:1664
WatchedItemQueryService
Definition: WatchedItemQueryService.php:23
ProxyLookup
Definition: ProxyLookup.php:29
VirtualRESTServiceClient
Virtual HTTP service client loosely styled after a Virtual File System.
Definition: VirtualRESTServiceClient.php:45
MediaWiki\Interwiki\InterwikiLookup
Service interface for looking up Interwiki records.
Definition: InterwikiLookup.php:32
MediaWiki\MediaWikiServices\getPageStore
getPageStore()
Definition: MediaWikiServices.php:1311
MediaWiki\MediaWikiServices\getUndeletePageFactory
getUndeletePageFactory()
Definition: MediaWikiServices.php:1688
MediaWiki\User\UserNamePrefixSearch
Handles searching prefixes of user names.
Definition: UserNamePrefixSearch.php:39
MediaWiki\MediaWikiServices\getFileBackendGroup
getFileBackendGroup()
Definition: MediaWikiServices.php:953
MediaWiki
A helper class for throttling authentication attempts.
MediaWiki\MediaWikiServices\getParserCacheFactory
getParserCacheFactory()
Definition: MediaWikiServices.php:1351
MediaWiki\Block\UnblockUserFactory
Definition: UnblockUserFactory.php:30
MediaWiki\Content\Transform\ContentTransformer
A service to transform content.
Definition: ContentTransformer.php:15
MediaWiki\MediaWikiServices\getMessageFormatterFactory
getMessageFormatterFactory()
Definition: MediaWikiServices.php:1228
Page\WikiPageFactory
Definition: WikiPageFactory.php:20
MediaWiki\MediaWikiServices\newSearchEngine
newSearchEngine()
Definition: MediaWikiServices.php:1519
MediaWiki\MediaWikiServices\getMainConfig
getMainConfig()
Returns the Config object that provides configuration for MediaWiki core.
Definition: MediaWikiServices.php:1172
MediaWiki\MediaWikiServices\getObjectFactory
getObjectFactory()
ObjectFactory is intended for instantiating "handlers" from declarative definitions,...
Definition: MediaWikiServices.php:1279
MediaWiki\MediaWikiServices\getSearchEngineFactory
getSearchEngineFactory()
Definition: MediaWikiServices.php:1536
MediaWiki\Actions\ActionFactory
Definition: ActionFactory.php:45
MediaWiki\MediaWikiServices\getRestrictionStore
getRestrictionStore()
Definition: MediaWikiServices.php:1447
MediaWiki\Storage\BlobStoreFactory
Service for instantiating BlobStores.
Definition: BlobStoreFactory.php:35
GlobalVarConfig
Accesses configuration settings from $GLOBALS.
Definition: GlobalVarConfig.php:29
TitleParser
A title parser service for MediaWiki.
Definition: TitleParser.php:33
MediaWiki\MediaWikiServices\disableStorageBackend
static disableStorageBackend()
Disables all storage layer services.
Definition: MediaWikiServices.php:455
Page\DeletePageFactory
Definition: DeletePageFactory.php:10
MediaWiki\Collation\CollationFactory
Common factory to construct collation classes.
Definition: CollationFactory.php:36
MediaWiki\Content\Renderer\ContentRenderer
A service to render content.
Definition: ContentRenderer.php:15
MediaWiki\MediaWikiServices\getPageStoreFactory
getPageStoreFactory()
Definition: MediaWikiServices.php:1319
MediaWiki\MediaWikiServices\getRevisionStoreFactory
getRevisionStoreFactory()
Definition: MediaWikiServices.php:1495
MediaWiki\MediaWikiServices\getUserIdentityLookup
getUserIdentityLookup()
Definition: MediaWikiServices.php:1744
MediaWiki\MediaWikiServices\getDBLoadBalancerFactory
getDBLoadBalancerFactory()
Definition: MediaWikiServices.php:905
MediaWiki\MediaWikiServices\newInstance
static newInstance(Config $bootstrapConfig, $loadWiring='')
Creates a new MediaWikiServices instance and initializes it according to the given $bootstrapConfig.
Definition: MediaWikiServices.php:428
MediaWiki\MediaWikiServices\getTitleFormatter
getTitleFormatter()
Definition: MediaWikiServices.php:1656
MediaWiki\MediaWikiServices\getLinkBatchFactory
getLinkBatchFactory()
Definition: MediaWikiServices.php:1097
MediaWiki\Tidy\TidyDriverBase
Base class for HTML cleanup utilities.
Definition: TidyDriverBase.php:8
MediaWiki\MediaWikiServices\getHttpRequestFactory
getHttpRequestFactory()
Definition: MediaWikiServices.php:1017
MediaWiki\MediaWikiServices\getActorStore
getActorStore()
Definition: MediaWikiServices.php:600
MediaWiki\MediaWikiServices\getBlockActionInfo
getBlockActionInfo()
Definition: MediaWikiServices.php:656
MediaWiki\MediaWikiServices\getCriticalSectionProvider
getCriticalSectionProvider()
Definition: MediaWikiServices.php:865
MediaWiki\MediaWikiServices\getRevisionFactory
getRevisionFactory()
Definition: MediaWikiServices.php:1463
MediaWiki\MediaWikiServices\getParserCache
getParserCache()
Definition: MediaWikiServices.php:1343
Page\UndeletePageFactory
Definition: UndeletePageFactory.php:10
MediaWiki\MediaWikiServices\salvage
salvage(self $other)
@noinspection PhpDocSignatureInspection
Definition: MediaWikiServices.php:392
MediaWiki\FileBackend\FSFile\TempFSFileFactory
Definition: TempFSFileFactory.php:10
MediaWiki\MediaWikiServices\getPreferencesFactory
getPreferencesFactory()
Definition: MediaWikiServices.php:1407
MediaWiki\MediaWikiServices\__construct
__construct(Config $config)
Definition: MediaWikiServices.php:561
MediaWiki\MediaWikiServices\getContentModelChangeFactory
getContentModelChangeFactory()
Definition: MediaWikiServices.php:825
UserNamePrefixSearch
Handles searching prefixes of user names.
Definition: UserNamePrefixSearch_deprecated.php:37
MediaWiki\User\UserGroupManagerFactory
Factory service for UserGroupManager instances.
Definition: UserGroupManagerFactory.php:37
MediaWiki\User\UserIdentityLookup
Definition: UserIdentityLookup.php:33
ExternalStoreFactory
Definition: ExternalStoreFactory.php:14
MediaWiki\Revision\RevisionRenderer
The RevisionRenderer service provides access to rendered output for revisions.
Definition: RevisionRenderer.php:45
MediaWiki\Permissions\PermissionManager
A service class for checking permissions To obtain an instance, use MediaWikiServices::getInstance()-...
Definition: PermissionManager.php:53
MediaWiki\MediaWikiServices\getPasswordFactory
getPasswordFactory()
Definition: MediaWikiServices.php:1375
ParserFactory
Definition: ParserFactory.php:37
MediaWiki\MediaWikiServices\getService
getService( $name)
Definition: MediaWikiServices.php:282
MediaWiki\MediaWikiServices\getPageEditStash
getPageEditStash()
Definition: MediaWikiServices.php:1295
MediaWiki\MediaWikiServices\getWikiRevisionOldRevisionImporterNoUpdates
getWikiRevisionOldRevisionImporterNoUpdates()
Definition: MediaWikiServices.php:1858
MediaWiki\User\BotPasswordStore
Definition: BotPasswordStore.php:44
MediaWiki\MediaWikiServices\getHtmlCacheUpdater
getHtmlCacheUpdater()
Definition: MediaWikiServices.php:1009
MediaWiki\Content\IContentHandlerFactory
Definition: IContentHandlerFactory.php:10
MediaWiki\MediaWikiServices\getVirtualRESTServiceClient
getVirtualRESTServiceClient()
Definition: MediaWikiServices.php:1784
SkinFactory
Factory class to create Skin objects.
Definition: SkinFactory.php:31
MediaWiki\EditPage\SpamChecker
Service to check if text (either content or a summary) qualifies as spam.
Definition: SpamChecker.php:14
MediaWiki\MediaWikiServices\getBadFileLookup
getBadFileLookup()
Definition: MediaWikiServices.php:632
MediaWiki\MediaWikiServices\getConfigFactory
getConfigFactory()
Definition: MediaWikiServices.php:785
MediaWiki\JobQueue\JobQueueGroupFactory
Class to construct JobQueueGroups.
Definition: JobQueueGroupFactory.php:37
MediaWiki\Shell\CommandFactory
Factory facilitating dependency injection for Command.
Definition: CommandFactory.php:35
MediaWiki\MediaWikiServices\getWikiRevisionUploadImporter
getWikiRevisionUploadImporter()
Definition: MediaWikiServices.php:1866
MediaWiki\Preferences\PreferencesFactory
A PreferencesFactory is a MediaWiki service that provides the definitions of preferences for a given ...
Definition: PreferencesFactory.php:54
MediaWiki\MediaWikiServices\getTidy
getTidy()
Definition: MediaWikiServices.php:1640
WANObjectCache
Multi-datacenter aware caching interface.
Definition: WANObjectCache.php:137
MediaWiki\MediaWikiServices\getUserNameUtils
getUserNameUtils()
Definition: MediaWikiServices.php:1760
MediaWiki\MediaWikiServices\getUserGroupManagerFactory
getUserGroupManagerFactory()
Definition: MediaWikiServices.php:1736
HtmlCacheUpdater
Class to invalidate the CDN and HTMLFileCache entries associated with URLs/titles.
Definition: HtmlCacheUpdater.php:32
MediaWiki\MediaWikiServices\getRevisionRenderer
getRevisionRenderer()
Definition: MediaWikiServices.php:1479
MediaWiki\MediaWikiServices\getUserOptionsLookup
getUserOptionsLookup()
Definition: MediaWikiServices.php:1768
MediaWiki\MediaWikiServices\getCommentFormatter
getCommentFormatter()
Definition: MediaWikiServices.php:769
MediaWiki\User\CentralId\CentralIdLookupFactory
Definition: CentralIdLookupFactory.php:34
MediaWiki\MediaWikiServices\getContributionsLookup
getContributionsLookup()
Definition: MediaWikiServices.php:857
LocalisationCache
Class for caching the contents of localisation files, Messages*.php and *.i18n.php.
Definition: LocalisationCache.php:43
MediaWiki\Config\ConfigRepository
Object which holds currently registered configuration options.
Definition: ConfigRepository.php:33
MediaWiki\MediaWikiServices\hasInstance
static hasInstance()
Returns true if an instance has already been initialized.
Definition: MediaWikiServices.php:240
MediaWiki\Storage\NameTableStore
Definition: NameTableStore.php:36
MediaWiki\Block\BlockActionInfo
Defines the actions that can be blocked by a partial block.
Definition: BlockActionInfo.php:40
MediaWiki\MediaWikiServices\getExternalStoreFactory
getExternalStoreFactory()
Definition: MediaWikiServices.php:945
Parser
PHP Parser - Processes wiki markup (which uses a more user-friendly syntax, such as "[[link]]" for ma...
Definition: Parser.php:92
MediaWiki\Revision\RevisionStoreFactory
Factory service for RevisionStore instances.
Definition: RevisionStoreFactory.php:55
MediaWiki\Shell\ShellboxClientFactory
This is a service which provides a configured client to access a remote Shellbox installation.
Definition: ShellboxClientFactory.php:15
MediaWiki\User\UserOptionsLookup
Provides access to user options.
Definition: UserOptionsLookup.php:29
MediaWiki\MediaWikiServices\getDateFormatterFactory
getDateFormatterFactory()
Definition: MediaWikiServices.php:889
Page\MovePageFactory
Definition: MovePageFactory.php:30
SearchEngine
Contain a class for special pages.
Definition: SearchEngine.php:37
MediaWiki\MediaWikiServices\getTitleFactory
getTitleFactory()
Definition: MediaWikiServices.php:1648
MediaWiki\Auth\AuthManager
This serves as the entry point to the authentication system.
Definition: AuthManager.php:102
MediaWiki\Storage\BlobStore
Service for loading and storing data blobs.
Definition: BlobStore.php:35
MediaWiki\Revision\ContributionsLookup
Definition: ContributionsLookup.php:24
MediaWiki\User\UserOptionsManager
A service class to control user options.
Definition: UserOptionsManager.php:43
TrackingCategories
This class performs some operations related to tracking categories, such as creating a list of all su...
Definition: TrackingCategories.php:32
MediaWiki\MediaWikiServices\getMainWANObjectCache
getMainWANObjectCache()
Returns the main WAN cache, yielding EmptyBagOStuff if there is none.
Definition: MediaWikiServices.php:1196
MediaWiki\MediaWikiServices\getMimeAnalyzer
getMimeAnalyzer()
Definition: MediaWikiServices.php:1244
IBufferingStatsdDataFactory
MediaWiki adaptation of StatsdDataFactory that provides buffering functionality.
Definition: IBufferingStatsdDataFactory.php:13
MediaWiki\MediaWikiServices\getSiteStore
getSiteStore()
Definition: MediaWikiServices.php:1568
MediaWiki\MediaWikiServices\getBlobStore
getBlobStore()
Definition: MediaWikiServices.php:640
MediaWiki\MediaWikiServices\getMetricsFactory
getMetricsFactory()
Definition: MediaWikiServices.php:1236
MediaWiki\MediaWikiServices\getBotPasswordStore
getBotPasswordStore()
Definition: MediaWikiServices.php:729
Wikimedia\Message\IMessageFormatterFactory
A simple factory providing a message formatter for a given language code.
Definition: IMessageFormatterFactory.php:10
MediaWiki\MediaWikiServices\getUnblockUserFactory
getUnblockUserFactory()
Definition: MediaWikiServices.php:1680
MediaWiki\MediaWikiServices\getLocalServerObjectCache
getLocalServerObjectCache()
Returns the main server-local cache, yielding EmptyBagOStuff if there is none.
Definition: MediaWikiServices.php:1145
MediaWiki\MediaWikiServices\getMovePageFactory
getMovePageFactory()
Definition: MediaWikiServices.php:1252
ResourceLoader
ResourceLoader is a loading system for JavaScript and CSS resources.
Definition: ResourceLoader.php:58
OldRevisionImporter
Definition: OldRevisionImporter.php:6
MediaWiki\MediaWikiServices\getBlobStoreFactory
getBlobStoreFactory()
Definition: MediaWikiServices.php:648
MediaWiki\CommentFormatter\RowCommentFormatter
This is basically a CommentFormatter with a CommentStore dependency, allowing it to retrieve comment ...
Definition: RowCommentFormatter.php:15
MediaWiki\MediaWikiServices\getConfiguredReadOnlyMode
getConfiguredReadOnlyMode()
Definition: MediaWikiServices.php:801
MediaWiki\MediaWikiServices\getLanguageFactory
getLanguageFactory()
Definition: MediaWikiServices.php:1073
MediaWiki\MediaWikiServices\getRevisionStore
getRevisionStore()
Definition: MediaWikiServices.php:1487
MediaWiki\MediaWikiServices\getParserOutputAccess
getParserOutputAccess()
Definition: MediaWikiServices.php:1367
MediaWiki\User\UserEditTracker
Track info about user edit counts and timings.
Definition: UserEditTracker.php:21
MediaWiki\MediaWikiServices\getWikiRevisionOldRevisionImporter
getWikiRevisionOldRevisionImporter()
Definition: MediaWikiServices.php:1850
PageProps
Gives access to properties of a page.
Definition: PageProps.php:33
MediaWiki\MediaWikiServices\allowGlobalInstance
static allowGlobalInstance()
Allows a global service container instance to exist.
Definition: MediaWikiServices.php:223
MediaWiki\MediaWikiServices\getGroupPermissionsLookup
getGroupPermissionsLookup()
Definition: MediaWikiServices.php:993
MediaWiki\User\UserNameUtils
UserNameUtils service.
Definition: UserNameUtils.php:42
CentralIdLookup
The CentralIdLookup service allows for connecting local users with cluster-wide IDs.
Definition: CentralIdLookup.php:35
MediaWiki\MediaWikiServices\getParser
getParser()
Definition: MediaWikiServices.php:1335
MediaWiki\MediaWikiServices\getLanguageNameUtils
getLanguageNameUtils()
Definition: MediaWikiServices.php:1089
MediaWiki\MediaWikiServices\getDatabaseBlockStore
getDatabaseBlockStore()
Definition: MediaWikiServices.php:881
MediaWiki\MediaWikiServices\getNamespaceInfo
getNamespaceInfo()
Definition: MediaWikiServices.php:1260
MediaWiki\MediaWikiServices\resetChildProcessServices
static resetChildProcessServices()
Resets any services that may have become stale after a child process returns from after pcntl_fork().
Definition: MediaWikiServices.php:479
MediaWiki\MediaWikiServices\getSlotRoleRegistry
getSlotRoleRegistry()
Definition: MediaWikiServices.php:1584
TitleFormatter
A title formatter service for MediaWiki.
Definition: TitleFormatter.php:35
MediaWiki\MediaWikiServices\getActorNormalization
getActorNormalization()
Definition: MediaWikiServices.php:592
Wikimedia\Rdbms\LBFactory
An interface for generating database load balancers.
Definition: LBFactory.php:42
MediaWiki\MediaWikiServices\getContentLanguage
getContentLanguage()
Definition: MediaWikiServices.php:817
TitleFactory
Creates Title objects.
Definition: TitleFactory.php:35
MediaWiki\MediaWikiServices\getConfigRepository
getConfigRepository()
Definition: MediaWikiServices.php:793
Page\ContentModelChangeFactory
Definition: ContentModelChangeFactory.php:32
MediaWiki\Mail\IEmailer
Interface for sending emails.
Definition: IEmailer.php:34
MediaWiki\Cache\BacklinkCacheFactory
Definition: BacklinkCacheFactory.php:33
MediaWiki\MediaWikiServices\getGrantsInfo
getGrantsInfo()
Definition: MediaWikiServices.php:977
RepoGroup
Prioritized list of file repositories.
Definition: RepoGroup.php:32
ParserCache
Cache for ParserOutput objects corresponding to the latest page revisions.
Definition: ParserCache.php:63
ConfigFactory
Factory class to create Config objects.
Definition: ConfigFactory.php:31
MediaWiki\Storage\PageUpdaterFactory
A factory for PageUpdater instances.
Definition: PageUpdaterFactory.php:54
MediaWiki\Storage\NameTableStoreFactory
Definition: NameTableStoreFactory.php:26
SearchEngineConfig
Configuration handling class for SearchEngine.
Definition: SearchEngineConfig.php:12
MediaWiki\MediaWikiServices\getDeletePageFactory
getDeletePageFactory()
Definition: MediaWikiServices.php:913
MediaWiki\MediaWikiServices\getPageProps
getPageProps()
Definition: MediaWikiServices.php:1303
MediaWiki\Revision\SlotRoleRegistry
A registry service for SlotRoleHandlers, used to define which slot roles are available on which page.
Definition: SlotRoleRegistry.php:48
MediaWiki\MediaWikiServices\getEmailer
getEmailer()
Definition: MediaWikiServices.php:921
MediaWiki\HookContainer\HookContainer
HookContainer class.
Definition: HookContainer.php:45
PasswordFactory
Factory class for creating and checking Password objects.
Definition: PasswordFactory.php:30
NamespaceInfo
This is a utility class for dealing with namespaces that encodes all the "magic" behaviors of them ba...
Definition: NamespaceInfo.php:35
MediaWiki\HookContainer\HookRunner
This class provides an implementation of the core hook interfaces, forwarding hook calls to HookConta...
Definition: HookRunner.php:557
MediaWiki\MediaWikiServices\getLinkRendererFactory
getLinkRendererFactory()
Definition: MediaWikiServices.php:1124
MediaWiki\MediaWikiServices\getBlockUserFactory
getBlockUserFactory()
Definition: MediaWikiServices.php:696
WikiImporterFactory
Factory service for WikiImporter instances.
Definition: WikiImporterFactory.php:33
MediaWiki\MediaWikiServices\getUserGroupManager
getUserGroupManager()
Definition: MediaWikiServices.php:1728
MediaWiki\Json\JsonCodec
Definition: JsonCodec.php:36
MediaWiki\MediaWikiServices\getGrantsLocalization
getGrantsLocalization()
Definition: MediaWikiServices.php:985
JobRunner
Job queue runner utility methods.
Definition: JobRunner.php:41
MediaWiki\MediaWikiServices\getTalkPageNotificationManager
getTalkPageNotificationManager()
Definition: MediaWikiServices.php:1624
MediaWiki\MediaWikiServices\getLinkRenderer
getLinkRenderer()
LinkRenderer instance that can be used if no custom options are needed.
Definition: MediaWikiServices.php:1116
MediaWiki\Permissions\RestrictionStore
Class RestrictionStore.
Definition: RestrictionStore.php:28
MediaWiki\MediaWikiServices\getHookContainer
getHookContainer()
Definition: MediaWikiServices.php:1001
MediaWiki\MediaWikiServices\getWatchlistNotificationManager
getWatchlistNotificationManager()
Definition: MediaWikiServices.php:1809
MediaWiki\MediaWikiServices\getMainObjectStash
getMainObjectStash()
Returns the main object stash, yielding EmptyBagOStuff if there is none.
Definition: MediaWikiServices.php:1184
Page\PageStore
Definition: PageStore.php:29
WatchedItemStoreInterface
Definition: WatchedItemStoreInterface.php:31
MessageCache
Cache of messages that are defined by MediaWiki namespace pages or by hooks.
Definition: MessageCache.php:52
MediaWiki\MediaWikiServices\getWikiExporterFactory
getWikiExporterFactory()
Definition: MediaWikiServices.php:1826
MediaWiki\MediaWikiServices\getLinkCache
getLinkCache()
Definition: MediaWikiServices.php:1105
MediaWiki\MediaWikiServices\getShellboxClientFactory
getShellboxClientFactory()
Definition: MediaWikiServices.php:1544
MediaWiki\Permissions\GrantsInfo
Users can authorize applications to use their account via OAuth.
Definition: GrantsInfo.php:32
Page\PageStoreFactory
Definition: PageStoreFactory.php:16
PasswordReset
Helper class for the password reset functionality shared by the web UI and the API.
Definition: PasswordReset.php:43
MediaWiki\MediaWikiServices\getReadOnlyMode
getReadOnlyMode()
Definition: MediaWikiServices.php:1423
MediaWiki\User\UserFactory
Creates User objects.
Definition: UserFactory.php:41
MediaWiki\Permissions\GrantsLocalization
This separate service is needed because the ::getGrantsLink method requires a LinkRenderer and if we ...
Definition: GrantsLocalization.php:37
Language
Internationalisation code See https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation for more...
Definition: Language.php:42
Wikimedia\Rdbms\ILoadBalancer
Database cluster connection, tracking, load balancing, and transaction manager interface.
Definition: ILoadBalancer.php:81
MediaWiki\MediaWikiServices\forceGlobalInstance
static forceGlobalInstance(MediaWikiServices $services)
Replaces the global MediaWikiServices instance.
Definition: MediaWikiServices.php:304
MediaWiki\User\ActorStore
Definition: ActorStore.php:43
MediaWiki\Storage\RevertedTagUpdateManager
Class for managing delayed RevertedTagUpdateJob waiting for user approval.
Definition: RevertedTagUpdateManager.php:36
JobQueueGroup
Class to handle enqueueing of background jobs.
Definition: JobQueueGroup.php:32
MediaWiki\Block\BlockRestrictionStore
Definition: BlockRestrictionStore.php:35
MediaWiki\MediaWikiServices\getStatsdDataFactory
getStatsdDataFactory()
Definition: MediaWikiServices.php:1616
MediaWiki\User\ActorNormalization
Service for dealing with the actor table.
Definition: ActorNormalization.php:32
MediaWiki\MediaWikiServices\getNameTableStoreFactory
getNameTableStoreFactory()
Definition: MediaWikiServices.php:1268
MediaWiki\MediaWikiServices\getRepoGroup
getRepoGroup()
Definition: MediaWikiServices.php:1431