MediaWiki  1.34.0
load.php
Go to the documentation of this file.
1 <?php
26 
27 // This endpoint is supposed to be independent of request cookies and other
28 // details of the session. Enforce this constraint with respect to session use.
29 define( 'MW_NO_SESSION', 1 );
30 
31 define( 'MW_ENTRY_POINT', 'load' );
32 
33 require __DIR__ . '/includes/WebStart.php';
34 
35 // URL safety checks
36 if ( !$wgRequest->checkUrlExtension() ) {
37  return;
38 }
39 
40 // Disable ChronologyProtector so that we don't wait for unrelated MediaWiki
41 // writes when getting database connections for ResourceLoader. (T192611)
42 MediaWikiServices::getInstance()->getDBLoadBalancerFactory()->disableChronologyProtection();
43 
44 $resourceLoader = MediaWikiServices::getInstance()->getResourceLoader();
46 
47 // Respond to ResourceLoader request
48 $resourceLoader->respond( $context );
49 
50 Profiler::instance()->setAllowOutput();
51 
53 $mediawiki->doPostOutputShutdown( 'fast' );
ResourceLoaderContext
Context object that contains information about the state of a specific ResourceLoader web request.
Definition: ResourceLoaderContext.php:33
Profiler\instance
static instance()
Singleton.
Definition: Profiler.php:63
MediaWiki\MediaWikiServices
MediaWikiServices is the service locator for the application scope of MediaWiki.
Definition: MediaWikiServices.php:117
$resourceLoader
$resourceLoader
Definition: load.php:44
$mediawiki
$mediawiki
Definition: load.php:52
MediaWiki
This class serves as a utility class for this extension.
$context
$context
Definition: load.php:45
$wgRequest
if(! $wgDBerrorLogTZ) $wgRequest
Definition: Setup.php:752