MediaWiki
1.23.17
|
The MediaWiki class is the helper class for the index.php entry point. More...
Public Member Functions | |
__construct (IContextSource $context=null) | |
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... | |
output (OutputPage $x=null) | |
request (WebRequest $x=null) | |
restInPeace () | |
Ends this task peacefully. More... | |
run () | |
Run the current MediaWiki instance index.php just calls this. More... | |
Protected Member Functions | |
triggerJobs () | |
Potentially open a socket and sent an HTTP request back to the server to run a specified number of jobs. More... | |
Private Member Functions | |
checkMaxLag () | |
Checks if the request should abort due to a lagged server, for given maxlag parameter. More... | |
initializeArticle () | |
Initialize the main Article object for "standard" actions (view, etc) Create an Article object for the page, following redirects if needed. More... | |
main () | |
parseTitle () | |
Parse the request to get the Title object. More... | |
performAction (Page $page, Title $requestTitle) | |
Perform one of the "standard" actions. More... | |
performRequest () | |
Performs the request. More... | |
tryNormaliseRedirect (Title $title) | |
Handle redirects for uncanonical title requests. More... | |
Private Attributes | |
String | $action |
Cache what action this request is. More... | |
IContextSource | $context |
TODO: fold $output, etc, into this. More... | |
The MediaWiki class is the helper class for the index.php entry point.
MediaWiki::__construct | ( | IContextSource | $context = null | ) |
IContextSource | null | $context |
Definition at line 62 of file Wiki.php.
References $context, and RequestContext\getMain().
|
private |
Checks if the request should abort due to a lagged server, for given maxlag parameter.
Definition at line 520 of file Wiki.php.
References global, list, wfGetLB(), wfProfileIn(), and wfProfileOut().
Referenced by run().
MediaWiki::getAction | ( | ) |
Returns the name of the action that will be executed.
Definition at line 150 of file Wiki.php.
References $action, action, and Action\getActionName().
Referenced by main(), and performAction().
MediaWiki::getTitle | ( | ) |
Get the Title object that we'll be acting on, as specified in the WebRequest.
Definition at line 138 of file Wiki.php.
References parseTitle().
Referenced by main(), outItem(), AtomFeed\outItem(), triggerJobs(), and Preferences\tryUISubmit().
|
private |
Initialize the main Article object for "standard" actions (view, etc) Create an Article object for the page, following redirects if needed.
Definition at line 373 of file Wiki.php.
References $action, $article, $file, $request, $title, array(), ContextSource\getRequest(), global, Article\newFromTitle(), Article\newFromWikiPage(), NS_FILE, NS_MEDIAWIKI, wfProfileIn(), wfProfileOut(), and wfRunHooks().
Referenced by performRequest().
|
private |
Definition at line 548 of file Wiki.php.
References $action, $cache, $output, $request, $timestamp, $title, $wgTitle, getAction(), ContextSource\getRequest(), getTitle(), global, Title\makeTitle(), Title\newFromText(), HTMLFileCache\newFromTitle(), NS_MAIN, performRequest(), HTMLFileCache\useFileCache(), wfDebugLog(), wfGetLBFactory(), wfProfileIn(), and wfProfileOut().
Referenced by run().
MediaWiki::output | ( | OutputPage | $x = null | ) |
|
private |
Parse the request to get the Title object.
Definition at line 75 of file Wiki.php.
References $action, $request, $ret, $rev, $title, $wgContLang, ContextSource\getRequest(), SpecialPage\getTitleFor(), global, Title\makeTitle(), Revision\newFromId(), Title\newFromID(), Title\newFromURL(), Title\newMainPage(), NS_FILE, and NS_MEDIA.
Referenced by getTitle().
Perform one of the "standard" actions.
$page | Page |
$requestTitle | The original title, before any redirects were applied |
Definition at line 456 of file Wiki.php.
References $action, $output, $request, $title, $user, array(), Action\factory(), getAction(), ContextSource\getRequest(), Title\getSquidURLs(), global, wfProfileIn(), wfProfileOut(), and wfRunHooks().
Referenced by performRequest().
|
private |
Performs the request.
MWException|PermissionsError|BadTitleError|HttpError |
Definition at line 170 of file Wiki.php.
References $article, $output, $query, $request, $title, $user, $wgTitle, action, array(), SpecialPageFactory\executePath(), ContextSource\getOutput(), SpecialPageFactory\getPage(), ContextSource\getRequest(), SpecialPage\getTitleFor(), global, initializeArticle(), list, NS_SPECIAL, performAction(), RedirectSpecialPage\personallyIdentifiableTarget(), SpecialPageFactory\resolveAlias(), tryNormaliseRedirect(), wfProfileIn(), wfProfileOut(), and wfRunHooks().
Referenced by main().
MediaWiki::request | ( | WebRequest | $x = null | ) |
MediaWiki::restInPeace | ( | ) |
Ends this task peacefully.
Definition at line 663 of file Wiki.php.
References $factory, DeferredUpdates\doUpdates(), wfDebug(), wfGetLBFactory(), and wfLogProfilingData().
Referenced by run().
MediaWiki::run | ( | ) |
Run the current MediaWiki instance index.php just calls this.
Definition at line 501 of file Wiki.php.
References $e, checkMaxLag(), MWExceptionHandler\handle(), main(), restInPeace(), and triggerJobs().
|
protected |
Potentially open a socket and sent an HTTP request back to the server to run a specified number of jobs.
This registers a callback to cleanup the socket once it's done.
Definition at line 683 of file Wiki.php.
References $n, $query, $section, array(), SpecialRunJobs\executeJobs(), SpecialRunJobs\getQuerySignature(), getTitle(), global, JobQueueGroup\singleton(), JobQueueGroup\TYPE_DEFAULT, wfAppendQuery(), wfDebugLog(), wfParseUrl(), wfReadOnly(), wfRestoreWarnings(), wfScript(), and wfSuppressWarnings().
Referenced by run().
|
private |
Handle redirects for uncanonical title requests.
Handles:
Behaviour:
Title | $title |
HttpError |
Definition at line 316 of file Wiki.php.
References $name, $output, $request, $title, array(), ContextSource\getRequest(), SpecialPage\getTitleFor(), global, list, PROTO_CURRENT, SpecialPageFactory\resolveAlias(), Hooks\run(), and wfExpandUrl().
Referenced by performRequest().
|
private |
Cache what action this request is.
Definition at line 57 of file Wiki.php.
Referenced by getAction(), initializeArticle(), main(), parseTitle(), and performAction().
|
private |
TODO: fold $output, etc, into this.
Definition at line 33 of file Wiki.php.
Referenced by __construct(), MediaWiki\Logger\BackcompatLogger\interpolate(), and MediaWiki\Logger\BackcompatLogger\log().