MediaWiki REL1_32
ServiceWiring.php
Go to the documentation of this file.
1<?php
40use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface;
62
63return [
64 'ActorMigration' => function ( MediaWikiServices $services ) : ActorMigration {
65 return new ActorMigration(
66 $services->getMainConfig()->get( 'ActorTableSchemaMigrationStage' )
67 );
68 },
69
70 'BlobStore' => function ( MediaWikiServices $services ) : BlobStore {
71 return $services->getService( '_SqlBlobStore' );
72 },
73
74 'BlobStoreFactory' => function ( MediaWikiServices $services ) : BlobStoreFactory {
75 return new BlobStoreFactory(
76 $services->getDBLoadBalancerFactory(),
77 $services->getMainWANObjectCache(),
78 $services->getMainConfig(),
79 $services->getContentLanguage()
80 );
81 },
82
83 'CommentStore' => function ( MediaWikiServices $services ) : CommentStore {
84 return new CommentStore(
85 $services->getContentLanguage(),
86 $services->getMainConfig()->get( 'CommentTableSchemaMigrationStage' )
87 );
88 },
89
90 'ConfigFactory' => function ( MediaWikiServices $services ) : ConfigFactory {
91 // Use the bootstrap config to initialize the ConfigFactory.
92 $registry = $services->getBootstrapConfig()->get( 'ConfigRegistry' );
93 $factory = new ConfigFactory();
94
95 foreach ( $registry as $name => $callback ) {
96 $factory->register( $name, $callback );
97 }
98 return $factory;
99 },
100
101 'ConfigRepository' => function ( MediaWikiServices $services ) : ConfigRepository {
102 return new ConfigRepository( $services->getConfigFactory() );
103 },
104
105 'ConfiguredReadOnlyMode' => function ( MediaWikiServices $services ) : ConfiguredReadOnlyMode {
106 return new ConfiguredReadOnlyMode( $services->getMainConfig() );
107 },
108
109 'ContentLanguage' => function ( MediaWikiServices $services ) : Language {
110 return Language::factory( $services->getMainConfig()->get( 'LanguageCode' ) );
111 },
112
113 'CryptHKDF' => function ( MediaWikiServices $services ) : CryptHKDF {
114 $config = $services->getMainConfig();
115
116 $secret = $config->get( 'HKDFSecret' ) ?: $config->get( 'SecretKey' );
117 if ( !$secret ) {
118 throw new RuntimeException( "Cannot use MWCryptHKDF without a secret." );
119 }
120
121 // In HKDF, the context can be known to the attacker, but this will
122 // keep simultaneous runs from producing the same output.
123 $context = [ microtime(), getmypid(), gethostname() ];
124
125 // Setup salt cache. Use APC, or fallback to the main cache if it isn't setup
126 $cache = $services->getLocalServerObjectCache();
127 if ( $cache instanceof EmptyBagOStuff ) {
129 }
130
131 return new CryptHKDF( $secret, $config->get( 'HKDFAlgorithm' ), $cache, $context );
132 },
133
134 'CryptRand' => function () : CryptRand {
135 return new CryptRand();
136 },
137
138 'DBLoadBalancer' => function ( MediaWikiServices $services ) : Wikimedia\Rdbms\LoadBalancer {
139 // just return the default LB from the DBLoadBalancerFactory service
140 return $services->getDBLoadBalancerFactory()->getMainLB();
141 },
142
143 'DBLoadBalancerFactory' =>
144 function ( MediaWikiServices $services ) : Wikimedia\Rdbms\LBFactory {
145 $mainConfig = $services->getMainConfig();
146
148 $mainConfig->get( 'LBFactoryConf' ),
149 $mainConfig,
150 $services->getConfiguredReadOnlyMode()
151 );
152 $class = MWLBFactory::getLBFactoryClass( $lbConf );
153
154 $instance = new $class( $lbConf );
155 MWLBFactory::setSchemaAliases( $instance, $mainConfig );
156
157 return $instance;
158 },
159
160 'EventRelayerGroup' => function ( MediaWikiServices $services ) : EventRelayerGroup {
161 return new EventRelayerGroup( $services->getMainConfig()->get( 'EventRelayerConfig' ) );
162 },
163
164 'ExternalStoreFactory' => function ( MediaWikiServices $services ) : ExternalStoreFactory {
165 $config = $services->getMainConfig();
166
167 return new ExternalStoreFactory(
168 $config->get( 'ExternalStores' )
169 );
170 },
171
172 'GenderCache' => function ( MediaWikiServices $services ) : GenderCache {
173 return new GenderCache();
174 },
175
176 'HttpRequestFactory' =>
177 function ( MediaWikiServices $services ) : \MediaWiki\Http\HttpRequestFactory {
178 return new \MediaWiki\Http\HttpRequestFactory();
179 },
180
181 'InterwikiLookup' => function ( MediaWikiServices $services ) : InterwikiLookup {
182 $config = $services->getMainConfig();
183 return new ClassicInterwikiLookup(
184 $services->getContentLanguage(),
185 $services->getMainWANObjectCache(),
186 $config->get( 'InterwikiExpiry' ),
187 $config->get( 'InterwikiCache' ),
188 $config->get( 'InterwikiScopes' ),
189 $config->get( 'InterwikiFallbackSite' )
190 );
191 },
192
193 'LinkCache' => function ( MediaWikiServices $services ) : LinkCache {
194 return new LinkCache(
195 $services->getTitleFormatter(),
196 $services->getMainWANObjectCache()
197 );
198 },
199
200 'LinkRenderer' => function ( MediaWikiServices $services ) : LinkRenderer {
201 global $wgUser;
202
203 if ( defined( 'MW_NO_SESSION' ) ) {
204 return $services->getLinkRendererFactory()->create();
205 } else {
206 return $services->getLinkRendererFactory()->createForUser( $wgUser );
207 }
208 },
209
210 'LinkRendererFactory' => function ( MediaWikiServices $services ) : LinkRendererFactory {
211 return new LinkRendererFactory(
212 $services->getTitleFormatter(),
213 $services->getLinkCache()
214 );
215 },
216
217 'LocalServerObjectCache' => function ( MediaWikiServices $services ) : BagOStuff {
218 $cacheId = \ObjectCache::detectLocalServerCache();
219 return \ObjectCache::newFromId( $cacheId );
220 },
221
222 'MagicWordFactory' => function ( MediaWikiServices $services ) : MagicWordFactory {
223 return new MagicWordFactory( $services->getContentLanguage() );
224 },
225
226 'MainConfig' => function ( MediaWikiServices $services ) : Config {
227 // Use the 'main' config from the ConfigFactory service.
228 return $services->getConfigFactory()->makeConfig( 'main' );
229 },
230
231 'MainObjectStash' => function ( MediaWikiServices $services ) : BagOStuff {
232 $mainConfig = $services->getMainConfig();
233
234 $id = $mainConfig->get( 'MainStash' );
235 if ( !isset( $mainConfig->get( 'ObjectCaches' )[$id] ) ) {
236 throw new UnexpectedValueException(
237 "Cache type \"$id\" is not present in \$wgObjectCaches." );
238 }
239
240 return \ObjectCache::newFromParams( $mainConfig->get( 'ObjectCaches' )[$id] );
241 },
242
243 'MainWANObjectCache' => function ( MediaWikiServices $services ) : WANObjectCache {
244 $mainConfig = $services->getMainConfig();
245
246 $id = $mainConfig->get( 'MainWANCache' );
247 if ( !isset( $mainConfig->get( 'WANObjectCaches' )[$id] ) ) {
248 throw new UnexpectedValueException(
249 "WAN cache type \"$id\" is not present in \$wgWANObjectCaches." );
250 }
251
252 $params = $mainConfig->get( 'WANObjectCaches' )[$id];
253 $objectCacheId = $params['cacheId'];
254 if ( !isset( $mainConfig->get( 'ObjectCaches' )[$objectCacheId] ) ) {
255 throw new UnexpectedValueException(
256 "Cache type \"$objectCacheId\" is not present in \$wgObjectCaches." );
257 }
258 $params['store'] = $mainConfig->get( 'ObjectCaches' )[$objectCacheId];
259
260 return \ObjectCache::newWANCacheFromParams( $params );
261 },
262
263 'MediaHandlerFactory' => function ( MediaWikiServices $services ) : MediaHandlerFactory {
264 return new MediaHandlerFactory(
265 $services->getMainConfig()->get( 'MediaHandlers' )
266 );
267 },
268
269 'MimeAnalyzer' => function ( MediaWikiServices $services ) : MimeAnalyzer {
270 $logger = LoggerFactory::getInstance( 'Mime' );
271 $mainConfig = $services->getMainConfig();
272 $params = [
273 'typeFile' => $mainConfig->get( 'MimeTypeFile' ),
274 'infoFile' => $mainConfig->get( 'MimeInfoFile' ),
275 'xmlTypes' => $mainConfig->get( 'XMLMimeTypes' ),
276 'guessCallback' =>
277 function ( $mimeAnalyzer, &$head, &$tail, $file, &$mime ) use ( $logger ) {
278 // Also test DjVu
279 $deja = new DjVuImage( $file );
280 if ( $deja->isValid() ) {
281 $logger->info( "Detected $file as image/vnd.djvu\n" );
282 $mime = 'image/vnd.djvu';
283
284 return;
285 }
286 // Some strings by reference for performance - assuming well-behaved hooks
288 'MimeMagicGuessFromContent',
289 [ $mimeAnalyzer, &$head, &$tail, $file, &$mime ]
290 );
291 },
292 'extCallback' => function ( $mimeAnalyzer, $ext, &$mime ) {
293 // Media handling extensions can improve the MIME detected
294 Hooks::run( 'MimeMagicImproveFromExtension', [ $mimeAnalyzer, $ext, &$mime ] );
295 },
296 'initCallback' => function ( $mimeAnalyzer ) {
297 // Allow media handling extensions adding MIME-types and MIME-info
298 Hooks::run( 'MimeMagicInit', [ $mimeAnalyzer ] );
299 },
300 'logger' => $logger
301 ];
302
303 if ( $params['infoFile'] === 'includes/mime.info' ) {
304 $params['infoFile'] = __DIR__ . "/libs/mime/mime.info";
305 }
306
307 if ( $params['typeFile'] === 'includes/mime.types' ) {
308 $params['typeFile'] = __DIR__ . "/libs/mime/mime.types";
309 }
310
311 $detectorCmd = $mainConfig->get( 'MimeDetectorCommand' );
312 if ( $detectorCmd ) {
313 $factory = $services->getShellCommandFactory();
314 $params['detectCallback'] = function ( $file ) use ( $detectorCmd, $factory ) {
315 $result = $factory->create()
316 // $wgMimeDetectorCommand can contain commands with parameters
317 ->unsafeParams( $detectorCmd )
318 ->params( $file )
319 ->execute();
320 return $result->getStdout();
321 };
322 }
323
324 return new MimeAnalyzer( $params );
325 },
326
327 'NameTableStoreFactory' => function ( MediaWikiServices $services ) : NameTableStoreFactory {
328 return new NameTableStoreFactory(
329 $services->getDBLoadBalancerFactory(),
330 $services->getMainWANObjectCache(),
331 LoggerFactory::getInstance( 'NameTableSqlStore' )
332 );
333 },
334
335 'OldRevisionImporter' => function ( MediaWikiServices $services ) : OldRevisionImporter {
337 true,
338 LoggerFactory::getInstance( 'OldRevisionImporter' ),
339 $services->getDBLoadBalancer()
340 );
341 },
342
343 'Parser' => function ( MediaWikiServices $services ) : Parser {
344 return $services->getParserFactory()->create();
345 },
346
347 'ParserCache' => function ( MediaWikiServices $services ) : ParserCache {
348 $config = $services->getMainConfig();
349 $cache = ObjectCache::getInstance( $config->get( 'ParserCacheType' ) );
350 wfDebugLog( 'caches', 'parser: ' . get_class( $cache ) );
351
352 return new ParserCache(
353 $cache,
354 $config->get( 'CacheEpoch' )
355 );
356 },
357
358 'ParserFactory' => function ( MediaWikiServices $services ) : ParserFactory {
359 return new ParserFactory(
360 $services->getMainConfig()->get( 'ParserConf' ),
361 $services->getMagicWordFactory(),
362 $services->getContentLanguage(),
364 $services->getSpecialPageFactory()
365 );
366 },
367
368 'PasswordFactory' => function ( MediaWikiServices $services ) : PasswordFactory {
369 $config = $services->getMainConfig();
370 return new PasswordFactory(
371 $config->get( 'PasswordConfig' ),
372 $config->get( 'PasswordDefault' )
373 );
374 },
375
376 'PerDbNameStatsdDataFactory' =>
377 function ( MediaWikiServices $services ) : StatsdDataFactoryInterface {
378 $config = $services->getMainConfig();
379 $wiki = $config->get( 'DBname' );
381 $services->getStatsdDataFactory(),
382 $wiki
383 );
384 },
385
386 'PreferencesFactory' => function ( MediaWikiServices $services ) : PreferencesFactory {
387 $factory = new DefaultPreferencesFactory(
388 $services->getMainConfig(),
389 $services->getContentLanguage(),
390 AuthManager::singleton(),
391 $services->getLinkRendererFactory()->create()
392 );
393 $factory->setLogger( LoggerFactory::getInstance( 'preferences' ) );
394
395 return $factory;
396 },
397
398 'ProxyLookup' => function ( MediaWikiServices $services ) : ProxyLookup {
399 $mainConfig = $services->getMainConfig();
400 return new ProxyLookup(
401 $mainConfig->get( 'SquidServers' ),
402 $mainConfig->get( 'SquidServersNoPurge' )
403 );
404 },
405
406 'ReadOnlyMode' => function ( MediaWikiServices $services ) : ReadOnlyMode {
407 return new ReadOnlyMode(
408 $services->getConfiguredReadOnlyMode(),
409 $services->getDBLoadBalancer()
410 );
411 },
412
413 'RevisionFactory' => function ( MediaWikiServices $services ) : RevisionFactory {
414 return $services->getRevisionStore();
415 },
416
417 'RevisionLookup' => function ( MediaWikiServices $services ) : RevisionLookup {
418 return $services->getRevisionStore();
419 },
420
421 'RevisionRenderer' => function ( MediaWikiServices $services ) : RevisionRenderer {
422 $renderer = new RevisionRenderer( $services->getDBLoadBalancer() );
423 $renderer->setLogger( LoggerFactory::getInstance( 'SaveParse' ) );
424
425 return $renderer;
426 },
427
428 'RevisionStore' => function ( MediaWikiServices $services ) : RevisionStore {
429 return $services->getRevisionStoreFactory()->getRevisionStore();
430 },
431
432 'RevisionStoreFactory' => function ( MediaWikiServices $services ) : RevisionStoreFactory {
433 $config = $services->getMainConfig();
434 $store = new RevisionStoreFactory(
435 $services->getDBLoadBalancerFactory(),
436 $services->getBlobStoreFactory(),
437 $services->getNameTableStoreFactory(),
438 $services->getMainWANObjectCache(),
439 $services->getCommentStore(),
440 $services->getActorMigration(),
441 $config->get( 'MultiContentRevisionSchemaMigrationStage' ),
442 LoggerFactory::getProvider(),
443 $config->get( 'ContentHandlerUseDB' )
444 );
445
446 return $store;
447 },
448
449 'SearchEngineConfig' => function ( MediaWikiServices $services ) : SearchEngineConfig {
450 return new SearchEngineConfig( $services->getMainConfig(),
451 $services->getContentLanguage() );
452 },
453
454 'SearchEngineFactory' => function ( MediaWikiServices $services ) : SearchEngineFactory {
455 return new SearchEngineFactory( $services->getSearchEngineConfig() );
456 },
457
458 'ShellCommandFactory' => function ( MediaWikiServices $services ) : CommandFactory {
459 $config = $services->getMainConfig();
460
461 $limits = [
462 'time' => $config->get( 'MaxShellTime' ),
463 'walltime' => $config->get( 'MaxShellWallClockTime' ),
464 'memory' => $config->get( 'MaxShellMemory' ),
465 'filesize' => $config->get( 'MaxShellFileSize' ),
466 ];
467 $cgroup = $config->get( 'ShellCgroup' );
468 $restrictionMethod = $config->get( 'ShellRestrictionMethod' );
469
470 $factory = new CommandFactory( $limits, $cgroup, $restrictionMethod );
471 $factory->setLogger( LoggerFactory::getInstance( 'exec' ) );
472 $factory->logStderr();
473
474 return $factory;
475 },
476
477 'SiteLookup' => function ( MediaWikiServices $services ) : SiteLookup {
478 $cacheFile = $services->getMainConfig()->get( 'SitesCacheFile' );
479
480 if ( $cacheFile !== false ) {
481 return new FileBasedSiteLookup( $cacheFile );
482 } else {
483 // Use the default SiteStore as the SiteLookup implementation for now
484 return $services->getSiteStore();
485 }
486 },
487
488 'SiteStore' => function ( MediaWikiServices $services ) : SiteStore {
489 $rawSiteStore = new DBSiteStore( $services->getDBLoadBalancer() );
490
491 // TODO: replace wfGetCache with a CacheFactory service.
492 // TODO: replace wfIsHHVM with a capabilities service.
494
495 return new CachingSiteStore( $rawSiteStore, $cache );
496 },
497
498 'SkinFactory' => function ( MediaWikiServices $services ) : SkinFactory {
499 $factory = new SkinFactory();
500
501 $names = $services->getMainConfig()->get( 'ValidSkinNames' );
502
503 foreach ( $names as $name => $skin ) {
504 $factory->register( $name, $skin, function () use ( $name, $skin ) {
505 $class = "Skin$skin";
506 return new $class( $name );
507 } );
508 }
509 // Register a hidden "fallback" skin
510 $factory->register( 'fallback', 'Fallback', function () {
511 return new SkinFallback;
512 } );
513 // Register a hidden skin for api output
514 $factory->register( 'apioutput', 'ApiOutput', function () {
515 return new SkinApi;
516 } );
517
518 return $factory;
519 },
520
521 'SpecialPageFactory' => function ( MediaWikiServices $services ) : SpecialPageFactory {
522 return new SpecialPageFactory(
523 $services->getMainConfig(),
524 $services->getContentLanguage()
525 );
526 },
527
528 'StatsdDataFactory' => function ( MediaWikiServices $services ) : IBufferingStatsdDataFactory {
530 rtrim( $services->getMainConfig()->get( 'StatsdMetricPrefix' ), '.' )
531 );
532 },
533
534 'TitleFormatter' => function ( MediaWikiServices $services ) : TitleFormatter {
535 return $services->getService( '_MediaWikiTitleCodec' );
536 },
537
538 'TitleParser' => function ( MediaWikiServices $services ) : TitleParser {
539 return $services->getService( '_MediaWikiTitleCodec' );
540 },
541
542 'UploadRevisionImporter' => function ( MediaWikiServices $services ) : UploadRevisionImporter {
544 $services->getMainConfig()->get( 'EnableUploads' ),
545 LoggerFactory::getInstance( 'UploadRevisionImporter' )
546 );
547 },
548
549 'VirtualRESTServiceClient' =>
551 $config = $services->getMainConfig()->get( 'VirtualRestConfig' );
552
553 $vrsClient = new VirtualRESTServiceClient( new MultiHttpClient( [] ) );
554 foreach ( $config['paths'] as $prefix => $serviceConfig ) {
555 $class = $serviceConfig['class'];
556 // Merge in the global defaults
557 $constructArg = $serviceConfig['options'] ?? [];
558 $constructArg += $config['global'];
559 // Make the VRS service available at the mount point
560 $vrsClient->mount( $prefix, [ 'class' => $class, 'config' => $constructArg ] );
561 }
562
563 return $vrsClient;
564 },
565
566 'WatchedItemQueryService' =>
568 return new WatchedItemQueryService(
569 $services->getDBLoadBalancer(),
570 $services->getCommentStore(),
571 $services->getActorMigration()
572 );
573 },
574
575 'WatchedItemStore' => function ( MediaWikiServices $services ) : WatchedItemStore {
576 $store = new WatchedItemStore(
577 $services->getDBLoadBalancerFactory(),
578 new HashBagOStuff( [ 'maxKeys' => 100 ] ),
579 $services->getReadOnlyMode(),
580 $services->getMainConfig()->get( 'UpdateRowsPerQuery' )
581 );
582 $store->setStatsdDataFactory( $services->getStatsdDataFactory() );
583
584 if ( $services->getMainConfig()->get( 'ReadOnlyWatchedItemStore' ) ) {
585 $store = new NoWriteWatchedItemStore( $store );
586 }
587
588 return $store;
589 },
590
591 'WikiRevisionOldRevisionImporterNoUpdates' =>
594 false,
595 LoggerFactory::getInstance( 'OldRevisionImporter' ),
596 $services->getDBLoadBalancer()
597 );
598 },
599
600 '_MediaWikiTitleCodec' => function ( MediaWikiServices $services ) : MediaWikiTitleCodec {
601 return new MediaWikiTitleCodec(
602 $services->getContentLanguage(),
603 $services->getGenderCache(),
604 $services->getMainConfig()->get( 'LocalInterwikis' ),
605 $services->getInterwikiLookup()
606 );
607 },
608
609 '_SqlBlobStore' => function ( MediaWikiServices $services ) : SqlBlobStore {
610 return $services->getBlobStoreFactory()->newSqlBlobStore();
611 },
612
614 // NOTE: When adding a service here, don't forget to add a getter function
615 // in the MediaWikiServices class. The convenience getter should just call
616 // $this->getService( 'FooBarService' ).
618
619];
wfUrlProtocols( $includeProtocolRelative=true)
Returns a regular expression of url protocols.
wfDebugLog( $logGroup, $text, $dest='all', array $context=[])
Send a line to a supplementary debug log file, if configured, or main debug log if not.
wfGetCache( $cacheType)
Get a specific cache object.
wfIsHHVM()
Check if we are running under HHVM.
This class handles the logic for the actor table migration.
Class representing a cache/ephemeral data store.
Definition BagOStuff.php:58
A factory for application metric data.
CommentStore handles storage of comments (edit summaries, log reasons, etc) in the database.
Factory class to create Config objects.
A read-only mode service which does not depend on LoadBalancer.
Support for detecting/validating DjVu image files and getting some basic file metadata (resolution et...
Definition DjVuImage.php:36
A BagOStuff object with no objects in it.
Factory class for spawning EventRelayer objects using configuration.
Provides a file-based cache of a SiteStore.
Caches user genders when needed to use correct namespace aliases.
Simple store for keeping values in an associative array for the current process.
static run( $event, array $args=[], $deprecatedVersion=null)
Call hook functions defined in Hooks::register and $wgHooks.
Definition Hooks.php:200
Various HTTP related functions.
Definition Http.php:27
Internationalisation code.
Definition Language.php:35
Cache for article titles (prefixed DB keys) and ids linked from one source.
Definition LinkCache.php:34
static applyDefaultConfig(array $lbConf, Config $mainConfig, ConfiguredReadOnlyMode $readOnlyMode)
static getLBFactoryClass(array $config)
Returns the LBFactory class to use and the load balancer configuration.
static setSchemaAliases(LBFactory $lbFactory, Config $config)
A factory that stores information about MagicWords, and creates them on demand with caching.
Class to construct MediaHandler objects.
A codec for MediaWiki page titles.
This serves as the entry point to the authentication system.
Object which holds currently registered configuration options.
InterwikiLookup implementing the "classic" interwiki storage (hardcoded up to MW 1....
Factory to create LinkRender objects.
Class that generates HTML links for pages.
PSR-3 logger instance factory.
MediaWikiServices is the service locator for the application scope of MediaWiki.
This is the default implementation of PreferencesFactory.
The RevisionRenderer service provides access to rendered output for revisions.
setLogger(LoggerInterface $saveParseLogger)
Factory service for RevisionStore instances.
Service for looking up page revisions.
Factory facilitating dependency injection for Command.
Factory for handling the special page list and generating SpecialPage objects.
Service for instantiating BlobStores.
Service for storing and loading Content objects.
Class to handle multiple HTTP requests.
Functions to get cache objects.
static getInstance( $id)
Get a cached instance of the specified type of cache object.
static getLocalClusterInstance()
Get the main cluster-local cache object.
PHP Parser - Processes wiki markup (which uses a more user-friendly syntax, such as "[[link]]" for ma...
Definition Parser.php:68
Factory class for creating and checking Password objects.
Proxy to prefix metric keys sent to a StatsdDataFactoryInterface.
A service class for fetching the wiki's current read-only mode.
Configuration handling class for SearchEngine.
Factory class for SearchEngine.
SkinTemplate class for API output.
Definition SkinApi.php:31
Factory class to create Skin objects.
SkinTemplate class for the fallback skin.
Virtual HTTP service client loosely styled after a Virtual File System.
Multi-datacenter aware caching interface.
Storage layer class for WatchedItems.
setStatsdDataFactory(StatsdDataFactoryInterface $stats)
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction you ll probably need to make sure the header is varied on and they can depend only on the ResourceLoaderContext $context
Definition hooks.txt:2885
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return true
Definition hooks.txt:2055
static configuration should be added through ResourceLoaderGetConfigVars instead can be used to get the real title e g db for database replication lag or jobqueue for job queue size converted to pseudo seconds It is possible to add more fields and they will be returned to the user in the API response after the basic globals have been set but before ordinary actions take place or wrap services the preferred way to define a new service is the $wgServiceWiringFiles array $services
Definition hooks.txt:2335
const CACHE_ANYTHING
Definition Defines.php:101
const CACHE_ACCEL
Definition Defines.php:105
Interface for configuration instances.
Definition Config.php:28
MediaWiki adaptation of StatsdDataFactory that provides buffering functionality.
Service interface for looking up Interwiki records.
A PreferencesFactory is a MediaWiki service that provides the definitions of preferences for a given ...
Service for constructing revision objects.
Service for looking up page revisions.
Service for loading and storing data blobs.
Definition BlobStore.php:33
A title formatter service for MediaWiki.
A title parser service for MediaWiki.
$cache
Definition mcc.php:33
A helper class for throttling authentication attempts.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Ge...
if( $ext=='php'|| $ext=='php5') $mime
Definition router.php:59
if(!is_readable( $file)) $ext
Definition router.php:55
$params