MediaWiki
master
|
The MediaWiki class is the helper class for the index.php entry point. More...
Classes | |
class | MediaWikiServices |
Service locator for MediaWiki core services. More... | |
Public Member Functions | |
__construct (IContextSource $context=null) | |
doPostOutputShutdown () | |
This function does work that can be done after the user gets the HTTP response so they don't block on it. More... | |
getAction () | |
Returns the name of the action that will be executed. More... | |
getTitle () | |
Get the Title object that we'll be acting on, as specified in the WebRequest. More... | |
restInPeace () | |
Ends this task peacefully. More... | |
run () | |
Run the current MediaWiki instance; index.php just calls this. More... | |
Static Public Member Functions | |
static | emitBufferedStatsdData (IBufferingStatsdDataFactory $stats, Config $config) |
Send out any buffered statsd data according to sampling rules. More... | |
static | preOutputCommit (IContextSource $context) |
This function commits all DB and session changes as needed before the client can receive a response (in case DB commit fails) and thus also before the response can trigger a subsequent related request by the client. More... | |
The MediaWiki class is the helper class for the index.php entry point.
Definition at line 50 of file MediaWiki.php.
MediaWiki::__construct | ( | IContextSource | $context = null | ) |
IContextSource | null | $context |
Definition at line 70 of file MediaWiki.php.
References RequestContext\getMain().
Referenced by MediaWiki\Html\HtmlHelper\modifyElements().
MediaWiki::doPostOutputShutdown | ( | ) |
This function does work that can be done after the user gets the HTTP response so they don't block on it.
This manages deferred updates, job insertion, final commit, and the logging of profiling data
Definition at line 859 of file MediaWiki.php.
References MWExceptionHandler\rollbackPrimaryChangesAndLog().
Referenced by MediaWiki\Rest\EntryPoint\execute().
|
static |
Send out any buffered statsd data according to sampling rules.
For web requests, this is called once by MediaWiki::restInPeace(), which is post-send (after the response is sent to the client).
For maintenance scripts, especially long-running CLI scripts, it is called more often, to avoid OOM, since we buffer stats (T181385), based on the following heuristics:
IBufferingStatsdDataFactory | $stats | |
Config | $config |
ConfigException |
Definition at line 1217 of file MediaWiki.php.
References IBufferingStatsdDataFactory\clearData(), MediaWiki\Config\Config\get(), IBufferingStatsdDataFactory\getData(), IBufferingStatsdDataFactory\hasData(), and MWExceptionHandler\logException().
Referenced by MWLBFactory\applyGlobalState(), and Maintenance\output().
MediaWiki::getAction | ( | ) |
Returns the name of the action that will be executed.
Definition at line 202 of file MediaWiki.php.
MediaWiki::getTitle | ( | ) |
Get the Title object that we'll be acting on, as specified in the WebRequest.
Definition at line 186 of file MediaWiki.php.
Referenced by MediaWiki\Specials\SpecialUpload\getExistsWarning(), MediaWiki\Specials\SpecialBlock\postHtml(), MediaWiki\Specials\SpecialMovePage\showForm(), and MediaWiki\Specials\SpecialRevisionDelete\showForm().
|
static |
This function commits all DB and session changes as needed before the client can receive a response (in case DB commit fails) and thus also before the response can trigger a subsequent related request by the client.
IContextSource | $context |
Definition at line 706 of file MediaWiki.php.
References DeferredUpdates\doUpdates(), MediaWiki\Config\Config\get(), IContextSource\getConfig(), IContextSource\getOutput(), IContextSource\getRequest(), IContextSource\getUser(), MWExceptionHandler\logException(), wfDebug(), and wfDebugLog().
Referenced by MediaWiki\Rest\EntryPoint\execute(), and ApiMain\executeActionWithErrorHandling().
MediaWiki::restInPeace | ( | ) |
Ends this task peacefully.
Definition at line 1148 of file MediaWiki.php.
References DeferredUpdates\doUpdates(), Profiler\instance(), and wfDebug().
MediaWiki::run | ( | ) |
Run the current MediaWiki instance; index.php just calls this.
Definition at line 612 of file MediaWiki.php.
References MWExceptionRenderer\getHTML(), IContextSource\getRequest(), IContextSource\getTitle(), MWExceptionHandler\handleException(), HTMLFileCache\MODE_OUTAGE, and HTMLFileCache\useFileCache().
Referenced by MediaWiki\Rest\SimpleHandler\execute().