MediaWiki master
MediaWiki.php
Go to the documentation of this file.
1<?php
28
36
37 public function __construct(
38 ?IContextSource $context = null,
39 ?EntryPointEnvironment $environment = null
40 ) {
41 $context ??= RequestContext::getMain();
43
44 parent::__construct( $context, $environment, MediaWikiServices::getInstance() );
45 }
46
50 protected function execute() {
51 throw new LogicException(
52 'The backwards-compat MediaWiki class does not implement the execute() method'
53 );
54 }
55
63 public function restInPeace() {
64 parent::restInPeace();
65 }
66
72 public function doPostOutputShutdown() {
73 parent::doPostOutputShutdown();
74 }
75
88 public static function preOutputCommit( IContextSource $context ) {
89 $entryPoint = new static( $context );
90 $entryPoint->prepareForOutput();
91 }
92
93}
Group all the pieces relevant to the context of a request into one instance.
Utility class wrapping PHP runtime state.
Base class for entry point handlers.
Service locator for MediaWiki core services.
static getInstance()
Returns the global default instance of the top level service locator.
__construct(?IContextSource $context=null, ?EntryPointEnvironment $environment=null)
Definition MediaWiki.php:37
doPostOutputShutdown()
Overwritten to make public, for backwards compatibility.
Definition MediaWiki.php:72
restInPeace()
Overwritten to make public, for backwards compatibility.
Definition MediaWiki.php:63
static preOutputCommit(IContextSource $context)
This function commits all DB and session changes as needed before the client can receive a response (...
Definition MediaWiki.php:88
Interface for objects which can provide a MediaWiki context on request.
A helper class for throttling authentication attempts.