Public Member Functions | |
| __construct () | |
| Constructor. | |
| setVal ($key, &$value) | |
| Stores key/value pairs to circumvent global variables Note that keys are case-insensitive! | |
| getVal ($key, $default= '') | |
| Retrieves key/value pairs to circumvent global variables Note that keys are case-insensitive! | |
| performRequestForTitle (&$title, &$article, &$output, &$user, $request) | |
| Initialization of . | |
| checkMaxLag ($maxLag) | |
| Check if the maximum lag of database slaves is higher that $maxLag, and if it's the case, output an error message. | |
| checkInitialQueries ($title, $action) | |
| Checks some initial queries Note that $title here is *not* a Title object, but a string! | |
| preliminaryChecks (&$title, &$output, $request) | |
| Checks for search query and anon-cannot-read case. | |
| handleSpecialCases (&$title, &$output, $request) | |
Initialize some special cases:
| |
| initializeArticle (&$title, &$output, $request) | |
| Initialize the object to be known as $wgArticle for "standard" actions Create an Article object for the page, following redirects if needed. | |
| finalCleanup (&$deferredUpdates, &$output) | |
| Cleaning up request by doing: deferred updates, DB transaction, and the output. | |
| doUpdates (&$updates) | |
| Deferred updates aren't really deferred anymore. | |
| doJobs () | |
| Do a job from the job queue. | |
| restInPeace () | |
| Ends this task peacefully. | |
| performAction (&$output, &$article, &$title, &$user, &$request) | |
| Perform one of the "standard" actions. | |
Static Public Member Functions | |
| static | articleFromTitle (&$title) |
| Create an Article object of the appropriate class for the given page. | |
Public Attributes | |
| $GET | |
| $params = array() | |
Definition at line 5 of file Wiki.php.
| MediaWiki::__construct | ( | ) |
| static MediaWiki::articleFromTitle | ( | &$ | title | ) | [static] |
Create an Article object of the appropriate class for the given page.
| $title | Title |
Definition at line 271 of file Wiki.php.
References $title, Title::makeTitle(), and wfRunHooks().
Referenced by SearchEngine::getNearMatchInternal(), and initializeArticle().
| MediaWiki::checkInitialQueries | ( | $ | title, | |
| $ | action | |||
| ) |
Checks some initial queries Note that $title here is *not* a Title object, but a string!
| $title | String | |
| $action | String |
Definition at line 107 of file Wiki.php.
References $action, $title, $wgContLang, $wgOut, $wgRequest, Revision::newFromId(), Title::newFromID(), Title::newFromURL(), and Title::newMainPage().
| MediaWiki::checkMaxLag | ( | $ | maxLag | ) |
Check if the maximum lag of database slaves is higher that $maxLag, and if it's the case, output an error message.
| $maxLag | int: maximum lag allowed for the request, as supplied by the client |
Definition at line 89 of file Wiki.php.
References $maxLag, wfGetLB(), and wfMaxlagError().
| MediaWiki::doJobs | ( | ) |
Do a job from the job queue.
Definition at line 414 of file Wiki.php.
References $job, $n, $output, $success, $t, getVal(), Job::pop(), wfDebugLog(), wfReadOnly(), and wfTime().
Referenced by finalCleanup().
| MediaWiki::doUpdates | ( | &$ | updates | ) |
Deferred updates aren't really deferred anymore.
It's important to report errors to the user, and that means doing this before OutputPage::output(). Note that for page saves, the client will wait until the script exits anyway before following the redirect.
| $updates | array of objects that hold an update to do |
Definition at line 391 of file Wiki.php.
References $dbw, wfGetDB(), wfProfileIn(), and wfProfileOut().
Referenced by finalCleanup().
| MediaWiki::finalCleanup | ( | &$ | deferredUpdates, | |
| &$ | output | |||
| ) |
Cleaning up request by doing: deferred updates, DB transaction, and the output.
| $deferredUpdates | array of updates to do | |
| $output | OutputPage |
Definition at line 369 of file Wiki.php.
References $output, doJobs(), doUpdates(), wfGetLBFactory(), wfProfileIn(), and wfProfileOut().
Referenced by preliminaryChecks().
| MediaWiki::getVal | ( | $ | key, | |
| $ | default = '' | |||
| ) |
Retrieves key/value pairs to circumvent global variables Note that keys are case-insensitive!
| $key | String: key to get | |
| $default | Mixed: default value if if the key doesn't exist |
Definition at line 34 of file Wiki.php.
Referenced by doJobs(), handleSpecialCases(), initializeArticle(), and performAction().
| MediaWiki::handleSpecialCases | ( | &$ | title, | |
| &$ | output, | |||
| $ | request | |||
| ) |
Initialize some special cases:
| $title | Title | |
| $output | OutputPage | |
| $request | WebRequest |
Definition at line 180 of file Wiki.php.
References $action, $output, $title, $url, $wgContLang, $wgUser, SpecialPage::executePath(), SpecialPage::getTitleFor(), getVal(), wfHttpError(), wfProfileIn(), and wfProfileOut().
Referenced by performRequestForTitle().
| MediaWiki::initializeArticle | ( | &$ | title, | |
| &$ | output, | |||
| $ | request | |||
| ) |
Initialize the object to be known as $wgArticle for "standard" actions Create an Article object for the page, following redirects if needed.
| $title | Title ($wgTitle) | |
| $output | OutputPage ($wgOut) | |
| $request | WebRequest ($wgRequest) |
Definition at line 302 of file Wiki.php.
References $action, $dbr, $output, $title, articleFromTitle(), getVal(), wfGetDB(), wfProfileIn(), wfProfileOut(), and wfRunHooks().
Referenced by performRequestForTitle().
| MediaWiki::performAction | ( | &$ | output, | |
| &$ | article, | |||
| &$ | title, | |||
| &$ | user, | |||
| &$ | request | |||
| ) |
Perform one of the "standard" actions.
| $output | OutputPage | |
| $article | Article | |
| $title | Title | |
| $user | User | |
| $request | WebRequest |
Definition at line 466 of file Wiki.php.
References $action, $mode, $output, $section, $title, SpecialPage::getPage(), getVal(), Credits::showPage(), wfHttpError(), wfMsg(), wfProfileIn(), wfProfileOut(), wfRunHooks(), and wfSetupSession().
Referenced by performRequestForTitle().
| MediaWiki::performRequestForTitle | ( | &$ | title, | |
| &$ | article, | |||
| &$ | output, | |||
| &$ | user, | |||
| $ | request | |||
| ) |
Initialization of .
.. everything Performs the request too
| $title | Title ($wgTitle) | |
| $article | Article | |
| $output | OutputPage | |
| $user | User | |
| $request | WebRequest |
Definition at line 52 of file Wiki.php.
References $output, $title, handleSpecialCases(), initializeArticle(), performAction(), preliminaryChecks(), wfProfileIn(), wfProfileOut(), and wfRunHooks().
| MediaWiki::preliminaryChecks | ( | &$ | title, | |
| &$ | output, | |||
| $ | request | |||
| ) |
Checks for search query and anon-cannot-read case.
| $title | Title | |
| $output | OutputPage | |
| $request | WebRequest |
Definition at line 146 of file Wiki.php.
References $output, $title, $wgDeferredUpdateList, finalCleanup(), and SpecialPage::getTitleFor().
Referenced by performRequestForTitle().
| MediaWiki::restInPeace | ( | ) |
Ends this task peacefully.
Definition at line 448 of file Wiki.php.
References wfDebug(), wfGetLBFactory(), and wfLogProfilingData().
| MediaWiki::setVal | ( | $ | key, | |
| &$ | value | |||
| ) |
1.5.9