MediaWiki
master
ResourceLoaderEntryPoint.php
Go to the documentation of this file.
1
<?php
21
namespace
MediaWiki\ResourceLoader
;
22
23
use
MediaWiki\MediaWikiEntryPoint
;
24
use
Profiler
;
25
34
class
ResourceLoaderEntryPoint
extends
MediaWikiEntryPoint
{
35
39
public
function
execute
() {
40
$services = $this->
getServiceContainer
();
41
42
// Disable ChronologyProtector so that we don't wait for unrelated MediaWiki
43
// writes when getting database connections for ResourceLoader. (T192611)
44
$services->getChronologyProtector()->setEnabled(
false
);
45
46
$resourceLoader = $services->getResourceLoader();
47
$context =
new
Context
(
48
$resourceLoader,
49
$this->
getRequest
()
50
);
51
52
// Respond to ResourceLoader request
53
$resourceLoader->respond( $context );
54
55
// Append any visible profiling data in a manner appropriate for the Content-Type
56
$profiler =
Profiler::instance
();
57
$profiler->setAllowOutput();
58
$profiler->logDataPageOutputOnly();
59
}
60
61
protected
function
doPrepareForOutput
() {
62
// No-op.
63
// Do not call parent::doPrepareForOutput() to avoid
64
// commitMainTransaction() getting called.
65
}
66
}
MediaWiki\MediaWikiEntryPoint
Base class for entry point handlers.
Definition
MediaWikiEntryPoint.php:77
MediaWiki\MediaWikiEntryPoint\getServiceContainer
getServiceContainer()
Returns the main service container.
Definition
MediaWikiEntryPoint.php:832
MediaWiki\MediaWikiEntryPoint\getRequest
getRequest()
Definition
MediaWikiEntryPoint.php:880
MediaWiki\ResourceLoader\Context
Context object that contains information about the state of a specific ResourceLoader web request.
Definition
Context.php:45
MediaWiki\ResourceLoader\ResourceLoaderEntryPoint
Entry point implementation for ResourceLoader, which serves static CSS/JavaScript via MediaWiki\Resou...
Definition
ResourceLoaderEntryPoint.php:34
MediaWiki\ResourceLoader\ResourceLoaderEntryPoint\doPrepareForOutput
doPrepareForOutput()
Prepare for sending the output.
Definition
ResourceLoaderEntryPoint.php:61
MediaWiki\ResourceLoader\ResourceLoaderEntryPoint\execute
execute()
Main entry point.
Definition
ResourceLoaderEntryPoint.php:39
Profiler
Profiler base class that defines the interface and some shared functionality.
Definition
Profiler.php:37
Profiler\instance
static instance()
Definition
Profiler.php:105
MediaWiki\ResourceLoader
Definition
CircularDependencyError.php:21
includes
ResourceLoader
ResourceLoaderEntryPoint.php
Generated on Thu May 9 2024 15:24:51 for MediaWiki by
1.10.0