MediaWiki  REL1_19
MediaWiki Class Reference

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

List of all members.

Public Member Functions

 __construct (IContextSource $context=null)
 finalCleanup ()
 Cleaning up request by doing deferred updates, DB transaction, and the output.
 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)
 Perform one of the "standard" actions.
 performRequest ()
 Performs the request.

Private Attributes

 $context

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 59 of file Wiki.php.

References $context, RequestContext\getMain(), and parseTitle().

Here is the call graph for this function:


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 303 of file Wiki.php.

References $title, Article\newFromTitle(), and wfDeprecated().

Here is the call graph for this function:

MediaWiki::checkMaxLag ( ) [private]

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

Returns:
bool

Definition at line 515 of file Wiki.php.

References $wgShowHostnames, echo, wfGetLB(), wfProfileIn(), and wfProfileOut().

Referenced by run().

Here is the call graph for this function:

Here is the caller graph for this function:

MediaWiki::doJobs ( ) [private]

Do a job from the job queue.

Definition at line 416 of file Wiki.php.

References $job, $n, $output, $success, $t, $wgJobRunRate, Job\pop(), wfDebugLog(), and wfReadOnly().

Referenced by finalCleanup().

Here is the call graph for this function:

Here is the caller graph for this function:

Cleaning up request by doing deferred updates, DB transaction, and the output.

Definition at line 399 of file Wiki.php.

References doJobs(), DeferredUpdates\doUpdates(), wfGetLBFactory(), wfProfileIn(), and wfProfileOut().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

Returns the name of the action that will be executed.

Returns:
string: action

Definition at line 313 of file Wiki.php.

References Action\getActionName().

Referenced by main(), and performAction().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Returns:
Title

Definition at line 129 of file Wiki.php.

References parseTitle().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

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 329 of file Wiki.php.

References $file, $title, $wgDisableHardRedirects, Article\newFromTitle(), wfProfileIn(), wfProfileOut(), and wfRunHooks().

Referenced by performRequest().

Here is the call graph for this function:

Here is the caller graph for this function:

MediaWiki::main ( ) [private]

Definition at line 543 of file Wiki.php.

References $title, $wgTitle, $wgUseAjax, $wgUseFileCache, finalCleanup(), getAction(), getTitle(), Title\makeTitle(), HTMLFileCache\newFromTitle(), performRequest(), HTMLFileCache\useFileCache(), wfProfileIn(), and wfProfileOut().

Referenced by run().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 50 of file Wiki.php.

MediaWiki::parseTitle ( ) [private]

Parse the request to get the Title object.

Returns:
Title object to be $wgTitle

Definition at line 73 of file Wiki.php.

References $title, $wgContLang, SpecialPage\getTitleFor(), Title\makeTitle(), Revision\newFromId(), Title\newFromID(), Title\newFromURL(), and Title\newMainPage().

Referenced by __construct(), and getTitle().

Here is the call graph for this function:

Here is the caller graph for this function:

MediaWiki::performAction ( Page page) [private]

Perform one of the "standard" actions.

Parameters:
$pagePage

Definition at line 465 of file Wiki.php.

References $output, $page, $title, $user, Action\factory(), getAction(), wfProfileIn(), wfProfileOut(), and wfRunHooks().

Referenced by performRequest().

Here is the call graph for this function:

Here is the caller graph for this function:

Performs the request.

  • bad titles
  • read restriction
  • local interwiki redirects
  • redirect loop
  • special pages
  • normal pages
Returns:
void

Definition at line 147 of file Wiki.php.

References $output, $title, $url, $user, $wgServer, $wgTitle, $wgUsePathInfo, SpecialPageFactory\executePath(), SpecialPage\getTitleFor(), initializeArticle(), performAction(), SpecialPageFactory\resolveAlias(), wfExpandUrl(), wfProfileIn(), wfProfileOut(), and wfRunHooks().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 40 of file Wiki.php.

Ends this task peacefully.

Definition at line 450 of file Wiki.php.

References MessageCache\logMessages(), wfDebug(), wfGetLBFactory(), and wfLogProfilingData().

Referenced by run().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 500 of file Wiki.php.

References checkMaxLag(), MWExceptionHandler\handle(), main(), and restInPeace().

Here is the call graph for this function:


Member Data Documentation

MediaWiki::$context [private]

Definition at line 34 of file Wiki.php.

Referenced by __construct().


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