MediaWiki  REL1_23
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.
 output (OutputPage $x=null)
 request (WebRequest $x=null)
 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

IContextSource $context
 TODO: fold $output, etc, into this.

Detailed Description

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

Definition at line 28 of file Wiki.php.


Constructor & Destructor Documentation

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

Definition at line 58 of file Wiki.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 462 of file Wiki.php.

Returns the name of the action that will be executed.

Returns:
string: action

Definition at line 146 of file Wiki.php.

Referenced by main().

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

Returns:
Title

Definition at line 134 of file Wiki.php.

Referenced by main(), and 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 315 of file Wiki.php.

MediaWiki::output ( OutputPage x = null)
Parameters:
$xnull|OutputPage
Returns:
OutputPage

Definition at line 49 of file Wiki.php.

MediaWiki::parseTitle ( ) [private]

Parse the request to get the Title object.

Returns:
Title object to be $wgTitle

Definition at line 71 of file Wiki.php.

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

Perform one of the "standard" actions.

Parameters:
$pagePage
$requestTitleThe original title, before any redirects were applied

Definition at line 398 of file Wiki.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 168 of file Wiki.php.

Referenced by main().

MediaWiki::request ( WebRequest x = null)
Parameters:
$xnull|WebRequest
Returns:
WebRequest

Definition at line 39 of file Wiki.php.

Ends this task peacefully.

Definition at line 605 of file Wiki.php.

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

Definition at line 443 of file Wiki.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 625 of file Wiki.php.


Member Data Documentation

IContextSource MediaWiki::$context [private]

TODO: fold $output, etc, into this.

Definition at line 33 of file Wiki.php.


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