Manual:OutputPage.php
From MediaWiki.org
| MediaWiki File: OutputPage.php | |
|---|---|
| Location: | /includes/ |
| Source code: | HEAD |
| Classes: | OutputPage |
[edit] Details
Hold HTML and wikitext parsing. Will also generate the <head> element for non-SkinTemplate skins or part of it for SkinTemplate based skins.
An instance of this class is located in $wgOut.
[edit] Methods
To output HTML:
- function output, called from function finalCleanup in Wiki.php. It calls function outputPage in Skin.php.
- function out, called from function outputPage in Skin.php a number of times, to send the HTML to the user: $mBodytext and HTML before and after it.
To generate HTML:
- function addPrimaryWikiText (deprecated, use
Article::outputWikitext()) which:- applies function parse in Parser.php to the wikitext $text, resulting in the HTML text $text
- applies function addParserOutput to the HTML text $text, which:
- applies function addHTML to $text, which appends $text to $mBodytext.
- function addWikiText which parse wikitext and add it to the HTML stored in that object. There are also variants of this function to choose the Title used to parse the wikitext or to choose whether the html should be parsed with HTML tidy.
- function addWikiMsg (since 1.12.0) which adds the content of the message to the HTML after parsing it.

