The OutputPage object takes care of generating HTML and other things related to creating a HTML-view of a page. It will also generate the <head> element for non-SkinTemplate skins or part of it for SkinTemplate based skins.
addWikiText($txt): parses wikitext and adds 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.
addWikiMsg($name, [$arg1, ...]) (since 1.12.0): adds the content of the message to the HTML after parsing it.
prependHTML($text): prepends $text (HTML) to the body HTML.
addPrimaryWikiText($text) (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.
addInlineScript($script): add a self-contained script tag with the given contents.
addInlineStyle($style_css, [$flip]): adds inline CSS styles. Set $flip to 'flip' to flip the CSS if needed (for RTL support). Defaults to 'noflip'.
disallowUserJs(): do not allow scripts which can be modified by wiki users to load on this page: only allow scripts bundled with, or generated by, the software. For security reasons scripts which can be modified by users should not be loaded on some pages, for example a login page.
redirect($url, [$responsecode]): redirect to $url rather than displaying the normal page. $responsecode defaults to 302.
getRedirect(): get the URL to redirect to, or an empty string if not redirect URL set.
addHeadItem($name, $value): sets a HEAD item.
addReturnTo($title, [$query, $text]): adds a "return to" link pointing to a specified title. $title is the Title object to link to. $query is an optional query string and $text the text of the link (input is not escaped).
addTemplate($template): adds the output of a QuickTemplate to the output buffer.
allowClickjacking(): turn off frame-breaking. See Clickjacking.
debug($text): Adds $text to the debug output.
getCategories(): get the list of category names this page belongs to.
isArticle(): is the content of the displayed page related to the source of the corresponding article on the wiki?
isArticleRelated(): is this page related to an article on the wiki?
setSquidMaxage($maxage): set the value of the "s-maxage" part of the "Cache-control" HTTP header. $maxages is the maximum cache time on the Squid, in seconds.