MediaWiki
1.23.2
|
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... | |
Private Attributes | |
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 58 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 462 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 146 of file Wiki.php.
References 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 134 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 315 of file Wiki.php.
References $article, $file, $title, array(), global, Article\newFromTitle(), Article\newFromWikiPage(), NS_FILE, NS_MEDIAWIKI, wfProfileIn(), wfProfileOut(), and wfRunHooks().
Referenced by performRequest().
|
private |
Definition at line 490 of file Wiki.php.
References $cache, $output, $timestamp, $title, $wgTitle, getAction(), 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 71 of file Wiki.php.
References $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 398 of file Wiki.php.
References $output, $title, $user, array(), Action\factory(), getAction(), Title\getSquidURLs(), global, wfProfileIn(), wfProfileOut(), and wfRunHooks().
Referenced by performRequest().
|
private |
Performs the request.
MWException|PermissionsError|BadTitleError|HttpError |
Definition at line 168 of file Wiki.php.
References $article, $name, $output, $query, $title, $user, $wgTitle, array(), SpecialPageFactory\executePath(), SpecialPage\getTitleFor(), global, initializeArticle(), list, NS_SPECIAL, performAction(), PROTO_CURRENT, SpecialPageFactory\resolveAlias(), wfExpandUrl(), wfProfileIn(), wfProfileOut(), and wfRunHooks().
Referenced by main().
MediaWiki::request | ( | WebRequest | $x = null | ) |
MediaWiki::restInPeace | ( | ) |
Ends this task peacefully.
Definition at line 605 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 443 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 625 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 |
TODO: fold $output, etc, into this.
Definition at line 33 of file Wiki.php.
Referenced by __construct().