MediaWiki  REL1_24
MediaWiki Class Reference

The MediaWiki class is the helper class for the index.php entry point. More...

Collaboration diagram for MediaWiki:

List of all members.

Public Member Functions

 __construct (IContextSource $context=null)
 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.
 restInPeace ()
 Ends this task peacefully.
 run ()
 Run the current MediaWiki instance index.php just calls this.

Protected Member Functions

 triggerJobs ()
 Potentially open a socket and sent an HTTP request back to the server to run a specified number of jobs.

Private Member Functions

 checkMaxLag ()
 Checks if the request should abort due to a lagged server, for given maxlag parameter.
 initializeArticle ()
 Initialize the main Article object for "standard" actions (view, etc) Create an Article object for the page, following redirects if needed.
 main ()
 parseTitle ()
 Parse the request to get the Title object.
 performAction (Page $page, Title $requestTitle)
 Perform one of the "standard" actions.
 performRequest ()
 Performs the request.

Private Attributes

Config $config
IContextSource $context

Detailed Description

The MediaWiki class is the helper class for the index.php entry point.

Definition at line 28 of file MediaWiki.php.


Constructor & Destructor Documentation

MediaWiki::__construct ( IContextSource context = null)
Parameters:
IContextSource | null$context

Definition at line 40 of file MediaWiki.php.


Member Function Documentation

MediaWiki::checkMaxLag ( ) [private]

Checks if the request should abort due to a lagged server, for given maxlag parameter.

Returns:
bool

Definition at line 456 of file MediaWiki.php.

Returns the name of the action that will be executed.

Returns:
string Action

Definition at line 133 of file MediaWiki.php.

Get the Title object that we'll be acting on, as specified in the WebRequest.

Returns:
Title

Definition at line 121 of file MediaWiki.php.

Referenced by Preferences\tryUISubmit().

Initialize the main Article object for "standard" actions (view, etc) Create an Article object for the page, following redirects if needed.

Returns:
mixed An Article, or a string to redirect to another URL

Definition at line 304 of file MediaWiki.php.

MediaWiki::main ( ) [private]

Definition at line 482 of file MediaWiki.php.

MediaWiki::parseTitle ( ) [private]

Parse the request to get the Title object.

Returns:
Title Title object to be $wgTitle

Definition at line 54 of file MediaWiki.php.

MediaWiki::performAction ( Page page,
Title requestTitle 
) [private]

Perform one of the "standard" actions.

Parameters:
Page$page
Title$requestTitleThe original title, before any redirects were applied

Definition at line 385 of file MediaWiki.php.

Performs the request.

  • bad titles
  • read restriction
  • local interwiki redirects
  • redirect loop
  • special pages
  • normal pages
Exceptions:
MWException|PermissionsError|BadTitleError|HttpError
Returns:
void

Definition at line 155 of file MediaWiki.php.

Ends this task peacefully.

Definition at line 600 of file MediaWiki.php.

Run the current MediaWiki instance index.php just calls this.

Definition at line 429 of file MediaWiki.php.

MediaWiki::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 620 of file MediaWiki.php.


Member Data Documentation

Config MediaWiki::$config [private]

Definition at line 35 of file MediaWiki.php.

IContextSource MediaWiki::$context [private]

Definition at line 31 of file MediaWiki.php.


The documentation for this class was generated from the following file: