MediaWiki  REL1_22
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.

Static Public Member Functions

static articleFromTitle ($title, IContextSource $context)
 Create an Article object of the appropriate class for the given page.

Private Member Functions

 checkMaxLag ()
 Checks if the request should abort due to a lagged server, for given maxlag parameter.
 doJobs ()
 Do a job from the job queue.
 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

static MediaWiki::articleFromTitle ( title,
IContextSource context 
) [static]

Create an Article object of the appropriate class for the given page.

Deprecated:
in 1.18; use Article::newFromTitle() instead
Parameters:
$titleTitle
$contextIContextSource
Returns:
Article object

Definition at line 164 of file Wiki.php.

MediaWiki::checkMaxLag ( ) [private]

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

Returns:
bool

Definition at line 478 of file Wiki.php.

MediaWiki::doJobs ( ) [private]

Do a job from the job queue.

Definition at line 637 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 335 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 418 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 181 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 616 of file Wiki.php.

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

Definition at line 463 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: