MediaWiki master
|
The index.php entry point for web browser navigations, usually routed to an Action or SpecialPage subclass. More...
Inherits MediaWiki\MediaWikiEntryPoint.
Public Member Functions | |
getAction () | |
Returns the name of the action that will be executed. | |
getTitle () | |
Get the Title object that we'll be acting on, as specified in the WebRequest. | |
Public Member Functions inherited from MediaWiki\MediaWikiEntryPoint | |
__construct (IContextSource $context, EntryPointEnvironment $environment, MediaWikiServices $mediaWikiServices) | |
enableOutputCapture () | |
Enable capturing of the current output buffer. | |
getCapturedOutput () | |
Stop capturing and return all output. | |
getRequestPathSuffix ( $basePath) | |
If the request URL matches a given base path, extract the path part of the request URL after that base, and decode escape sequences in it. | |
run () | |
Main app life cycle: Calls doSetup(), execute(), prepareForOutput(), and postOutputShutdown(). | |
Protected Member Functions | |
doPrepareForOutput () | |
Prepare for sending the output. | |
execute () | |
Determine and send the response headers and body for this web request. | |
getContext () | |
Overwritten to narrow the return type to RequestContext. | |
getOutput () | |
getUser () | |
handleTopLevelError (Throwable $e) | |
Report a top level error. | |
initializeArticle () | |
Initialize the main Article object for "standard" actions (view, etc) Create an Article object for the page, following redirects if needed. | |
maybeDoHttpsRedirect () | |
If the stars are suitably aligned, do an HTTP->HTTPS redirect. | |
parseTitle ( $request) | |
Parse the request to get the Title object. | |
performAction (Article $article, Title $requestTitle) | |
Perform one of the "standard" actions. | |
performRequest () | |
Performs the request. | |
schedulePostSendJobs () | |
If enabled, after everything specific to this request is done, occasionally run jobs. | |
tryNormaliseRedirect (Title $title) | |
Handle redirects for uncanonical title requests. | |
Protected Member Functions inherited from MediaWiki\MediaWikiEntryPoint | |
commitMainTransaction () | |
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. | |
commitOutputBuffer () | |
Ends the current output buffer, appending its content to the parent buffer. | |
disableModDeflate () | |
discardAllOutput () | |
Discards all buffered output, down to the capture buffer level. | |
discardOutputBuffer () | |
doPostOutputShutdown () | |
Forces the response to be sent to the client and then does work that can be done after the user gets the HTTP response, so they don't block on it. | |
doSetup () | |
Perform any setup needed before execute() is called. | |
drainOutputBuffer () | |
Returns the content of the current output buffer and clears it. | |
enterPostSendMode () | |
Disables all output to the client. | |
exit (int $code=0) | |
fastCgiFinishRequest () | |
Calls fastcgi_finish_request if possible. | |
flushOutputBuffer () | |
Flush buffered output to the client. | |
getBlockManager () | |
getConfig (string $key) | |
getDBLoadBalancerFactory () | |
getEnv (string $name) | |
Returns the value of an environment variable. | |
getIni (string $name) | |
Returns the value of an ini option. | |
getJobQueueGroupFactory () | |
getJobRunner () | |
getMessageCache () | |
getOutputBufferLength () | |
getOutputBufferLevel () | |
Returns the output buffer level. | |
getOutputBufferStatus () | |
getReadOnlyMode () | |
getRequest () | |
getRequestURL () | |
Returns the current request's path and query string (not a full URL), like PHP's built-in $_SERVER['REQUEST_URI']. | |
getResponse () | |
getServerInfo (string $key, $default=null) | |
getServiceContainer () | |
Returns the main service container. | |
getSpecialPageFactory () | |
getStatsdDataFactory () | |
getStatsFactory () | |
getStatusCode () | |
getUrlUtils () | |
hasFastCgi () | |
header (string $header, bool $replace=true, int $status=0) | |
inPostSendMode () | |
Whether enterPostSendMode() has been called. | |
isCli () | |
outputResponsePayload ( $content) | |
Print a response body to the current buffer (if there is one) or the server (otherwise) | |
postOutputShutdown () | |
Forces the response to be sent to the client and then does work that can be done after the user gets the HTTP response, so they don't block on it. | |
prepareForOutput () | |
Prepare for sending the output. | |
print ( $data) | |
restInPeace () | |
Ends this task peacefully. | |
setIniOption (string $name, $value) | |
setup () | |
Perform any setup needed before execute() is called. | |
shouldDoHttpRedirect () | |
Check if an HTTP->HTTPS redirect should be done. | |
startOutputBuffer (?callable $callback=null) | |
Adds a new output buffer level. | |
status (int $code) | |
triggerAsyncJobs ( $n, LoggerInterface $runJobsLogger) | |
triggerError (string $message, int $level=E_USER_NOTICE) | |
Triggers a PHP runtime error. | |
triggerSyncJobs ( $n) | |
Additional Inherited Members | |
Static Public Member Functions inherited from MediaWiki\MediaWikiEntryPoint | |
static | emitBufferedStatsdData (IBufferingStatsdDataFactory $stats, Config $config) |
Send out any buffered statsd data according to sampling rules. | |
Protected Attributes inherited from MediaWiki\MediaWikiEntryPoint | |
EntryPointEnvironment | $environment |
The index.php entry point for web browser navigations, usually routed to an Action or SpecialPage subclass.
Definition at line 41 of file ActionEntryPoint.php.
|
protected |
Prepare for sending the output.
Should be called by entry points before sending the response. Will be called automatically by run() via prepareForOutput(). Subclasses may override this method, but should not call it directly.
Reimplemented from MediaWiki\MediaWikiEntryPoint.
Definition at line 208 of file ActionEntryPoint.php.
|
protected |
Determine and send the response headers and body for this web request.
Reimplemented from MediaWiki\MediaWikiEntryPoint.
Definition at line 88 of file ActionEntryPoint.php.
References $wgTitle, getTitle(), Profiler\instance(), and ErrorPageError\report().
MediaWiki\Actions\ActionEntryPoint::getAction | ( | ) |
Returns the name of the action that will be executed.
Definition at line 348 of file ActionEntryPoint.php.
|
protected |
Overwritten to narrow the return type to RequestContext.
Reimplemented from MediaWiki\MediaWikiEntryPoint.
Definition at line 47 of file ActionEntryPoint.php.
|
protected |
Definition at line 55 of file ActionEntryPoint.php.
MediaWiki\Actions\ActionEntryPoint::getTitle | ( | ) |
Get the Title object that we'll be acting on, as specified in the WebRequest.
Definition at line 327 of file ActionEntryPoint.php.
|
protected |
Definition at line 59 of file ActionEntryPoint.php.
|
protected |
Report a top level error.
Subclasses in core may override this to handle errors according to the expected output format. This method is not safe to override for extensions.
Throwable | $e |
Reimplemented from MediaWiki\MediaWikiEntryPoint.
Definition at line 63 of file ActionEntryPoint.php.
|
protected |
|
protected |
If the stars are suitably aligned, do an HTTP->HTTPS redirect.
Note: Do this after $wgTitle is setup, otherwise the hooks run from isRegistered() will do all sorts of weird stuff.
Definition at line 175 of file ActionEntryPoint.php.
References NS_MAIN, and wfDebugLog().
|
protected |
Parse the request to get the Title object.
MalformedTitleException | If a title has been provided by the user, but is invalid. |
WebRequest | $request |
Definition at line 231 of file ActionEntryPoint.php.
|
protected |
Perform one of the "standard" actions.
Article | $article | |
Title | $requestTitle | The original title, before any redirects were applied |
Definition at line 690 of file ActionEntryPoint.php.
References getTitle(), Profiler\instance(), and MW_ENTRY_POINT.
|
protected |
Performs the request.
PermissionsError|BadTitleError|HttpError |
Definition at line 364 of file ActionEntryPoint.php.
References $url, $wgTitle, and MediaWiki\User\Options\UserOptionsLookup\getBoolOption().
|
protected |
If enabled, after everything specific to this request is done, occasionally run jobs.
Reimplemented from MediaWiki\MediaWikiEntryPoint.
Definition at line 215 of file ActionEntryPoint.php.
References getTitle().
|
protected |
Handle redirects for uncanonical title requests.
Handles:
Behaviour:
Title | $title |
HttpError |
Definition at line 544 of file ActionEntryPoint.php.