MediaWiki  master
load.php
Go to the documentation of this file.
1 <?php
29 
30 // This endpoint is supposed to be independent of request cookies and other
31 // details of the session. Enforce this constraint with respect to session use.
32 define( 'MW_NO_SESSION', 1 );
33 
34 define( 'MW_ENTRY_POINT', 'load' );
35 
36 require __DIR__ . '/includes/WebStart.php';
37 
38 wfLoadMain();
39 
40 function wfLoadMain() {
41  global $wgRequest;
42 
43  $services = MediaWikiServices::getInstance();
44  // Disable ChronologyProtector so that we don't wait for unrelated MediaWiki
45  // writes when getting database connections for ResourceLoader. (T192611)
46  $services->getDBLoadBalancerFactory()->disableChronologyProtection();
47 
48  $resourceLoader = $services->getResourceLoader();
49  $context = new ResourceLoaderContext( $resourceLoader, $wgRequest );
50 
51  // Respond to ResourceLoader request
52  $resourceLoader->respond( $context );
53 
54  // Append any visible profiling data in a manner appropriate for the Content-Type
55  $profiler = Profiler::instance();
56  $profiler->setAllowOutput();
57  $profiler->logDataPageOutputOnly();
58 
59  $mediawiki = new MediaWiki();
60  $mediawiki->doPostOutputShutdown();
61 }
ResourceLoaderContext
Context object that contains information about the state of a specific ResourceLoader web request.
Definition: ResourceLoaderContext.php:37
Profiler\instance
static instance()
Singleton.
Definition: Profiler.php:69
MediaWiki\MediaWikiServices
MediaWikiServices is the service locator for the application scope of MediaWiki.
Definition: MediaWikiServices.php:202
$wgRequest
$wgRequest
Definition: Setup.php:722
MediaWiki
A helper class for throttling authentication attempts.
wfLoadMain
wfLoadMain()
Definition: load.php:40
$mediawiki
$mediawiki
Definition: img_auth.php:48