MediaWiki  REL1_19
ParserOutput Class Reference
Inheritance diagram for ParserOutput:
Collaboration diagram for ParserOutput:

List of all members.

Public Member Functions

 __construct ($text= '', $languageLinks=array(), $categoryLinks=array(), $containsOldMagic=false, $titletext= '')
 addCategory ($c, $sort)
 addExternalLink ($url)
 addHeadItem ($section, $tag=false)
 Add some text to the <head>.
 addImage ($name, $timestamp=null, $sha1=null)
 Register a file dependency for this output.
 addInterwikiLink ($title)
 addLanguageLink ($t)
 addLink ($title, $id=null)
 Record a local or interwiki inline link for saving in future link tables.
 addModuleMessages ($modules)
 addModules ($modules)
 addModuleScripts ($modules)
 addModuleStyles ($modules)
 addOutputHook ($hook, $data=false)
 addOutputPageMetadata (OutputPage $out)
 Copy items from the OutputPage object into this one.
 addTemplate ($title, $page_id, $rev_id)
 Register a template dependency for this output.
 addWarning ($s)
getCategories ()
 getCategoryLinks ()
 getDisplayTitle ()
 Get the title to be used for display.
 getEditSectionTokens ()
getExternalLinks ()
getFileSearchOptions ()
 getFlag ($flag)
 getHeadItems ()
 getHideNewSection ()
getImages ()
 getIndexPolicy ()
 getInterwikiLinks ()
getLanguageLinks ()
getLinks ()
 getModuleMessages ()
 getModules ()
 getModuleScripts ()
 getModuleStyles ()
 getNewSection ()
 getNoGallery ()
 getOutputHooks ()
 getProperties ()
 getProperty ($name)
 getSections ()
getTemplateIds ()
getTemplates ()
 getText ()
 getTimestamp ()
 getTitleText ()
 getTOCHTML ()
 getUsedOptions ()
 Returns the options from its ParserOptions which have been taken into account to produce this output or false if not available.
 getWarnings ()
 hideNewSection ($value)
 preventClickjacking ($flag=null)
 Get or set the prevent-clickjacking flag.
 recordOption ($option)
 Callback passed by the Parser to the ParserOptions to keep track of which options are used.
 replaceEditSectionLinksCallback ($m)
 callback used by getText to replace editsection tokens
 setCategoryLinks ($cl)
 setDisplayTitle ($text)
 Override the title to be used for display.
 setEditSectionTokens ($t)
 setFlag ($flag)
 Fairly generic flag setter thingy.
 setIndexPolicy ($policy)
 setLanguageLinks ($ll)
 setNewSection ($value)
 setProperty ($name, $value)
 Set a property to be cached in the DB.
 setSections ($toc)
 setText ($text)
 setTimestamp ($timestamp)
 setTitleText ($t)
 setTOCHTML ($tochtml)

Public Attributes

 $mCategories
 $mEditSectionTokens = false
 $mExternalLinks = array()
 $mFileSearchOptions = array()
 $mHeadItems = array()
 $mHideNewSection = false
 $mImages = array()
 $mInterwikiLinks = array()
 $mLanguageLinks
 $mLinks = array()
 $mModuleMessages = array()
 $mModules = array()
 $mModuleScripts = array()
 $mModuleStyles = array()
 $mNewSection = false
 $mNoGallery = false
 $mOutputHooks = array()
 $mProperties = array()
 $mSections = array()
 $mTemplateIds = array()
 $mTemplates = array()
 $mText
 $mTimestamp
 $mTitleText
 $mTOCHTML = ''
 $mWarnings = array()
const EDITSECTION_REGEX = '#<(?:mw:)?editsection page="(.*?)" section="(.*?)"(?:/>|>(.*?)(</(?:mw:)?editsection>))#'

Private Attributes

 $mAccessedOptions = array()
 $mIndexPolicy = ''
 $mPreventClickjacking = false

Detailed Description

Definition at line 116 of file ParserOutput.php.


Constructor & Destructor Documentation

ParserOutput::__construct ( text = '',
languageLinks = array(),
categoryLinks = array(),
containsOldMagic = false,
titletext = '' 
)

Definition at line 149 of file ParserOutput.php.


Member Function Documentation

ParserOutput::addCategory ( c,
sort 
)

Definition at line 223 of file ParserOutput.php.

Definition at line 244 of file ParserOutput.php.

References $url, $wgRegisterInternalExternals, and $wgServer.

ParserOutput::addHeadItem ( section,
tag = false 
)

Add some text to the <head>.

If $tag is set, the section with that tag will only be included once in a given page.

Definition at line 339 of file ParserOutput.php.

References $section.

ParserOutput::addImage ( name,
timestamp = null,
sha1 = null 
)

Register a file dependency for this output.

Parameters:
$namestring Title dbKey
$timestampstring MW timestamp of file creation (or false if non-existing)
$sha1string base 36 SHA-1 of file (or false if non-existing)
Returns:
void

Definition at line 292 of file ParserOutput.php.

Parameters:
$titleTitle object, must be an interwiki link
Exceptions:
MWExceptionif given invalid input

Definition at line 323 of file ParserOutput.php.

References $title.

Referenced by addLink().

Here is the caller graph for this function:

Definition at line 224 of file ParserOutput.php.

References $t.

ParserOutput::addLink ( title,
id = null 
)

Record a local or interwiki inline link for saving in future link tables.

Parameters:
$titleTitle object
$idMixed: optional known page_id so we can skip the lookup

Definition at line 257 of file ParserOutput.php.

References $title, and addInterwikiLink().

Here is the call graph for this function:

Definition at line 359 of file ParserOutput.php.

Referenced by addOutputPageMetadata().

Here is the caller graph for this function:

ParserOutput::addModules ( modules)

Definition at line 347 of file ParserOutput.php.

Referenced by addOutputPageMetadata().

Here is the caller graph for this function:

Definition at line 351 of file ParserOutput.php.

Referenced by addOutputPageMetadata().

Here is the caller graph for this function:

Definition at line 355 of file ParserOutput.php.

Referenced by addOutputPageMetadata().

Here is the caller graph for this function:

ParserOutput::addOutputHook ( hook,
data = false 
)

Definition at line 227 of file ParserOutput.php.

ParserOutput::addTemplate ( title,
page_id,
rev_id 
)

Register a template dependency for this output.

Parameters:
$titleTitle
$page_id
$rev_id
Returns:
void

Definition at line 306 of file ParserOutput.php.

References $title.

Definition at line 225 of file ParserOutput.php.

Definition at line 190 of file ParserOutput.php.

Definition at line 189 of file ParserOutput.php.

Get the title to be used for display.

Returns:
String

Definition at line 395 of file ParserOutput.php.

References $t, and getTitleText().

Here is the call graph for this function:

Definition at line 193 of file ParserOutput.php.

Definition at line 199 of file ParserOutput.php.

Definition at line 198 of file ParserOutput.php.

ParserOutput::getFlag ( flag)

Definition at line 410 of file ParserOutput.php.

Definition at line 201 of file ParserOutput.php.

Definition at line 237 of file ParserOutput.php.

Definition at line 197 of file ParserOutput.php.

Definition at line 208 of file ParserOutput.php.

Definition at line 188 of file ParserOutput.php.

Definition at line 187 of file ParserOutput.php.

Definition at line 194 of file ParserOutput.php.

Definition at line 205 of file ParserOutput.php.

Definition at line 202 of file ParserOutput.php.

Definition at line 203 of file ParserOutput.php.

Definition at line 204 of file ParserOutput.php.

Definition at line 240 of file ParserOutput.php.

Definition at line 200 of file ParserOutput.php.

Definition at line 206 of file ParserOutput.php.

Definition at line 425 of file ParserOutput.php.

Definition at line 421 of file ParserOutput.php.

Definition at line 192 of file ParserOutput.php.

Definition at line 196 of file ParserOutput.php.

Definition at line 195 of file ParserOutput.php.

Referenced by WikiPage\doCascadeProtectionUpdates().

Here is the caller graph for this function:

Definition at line 159 of file ParserOutput.php.

References EDITSECTION_REGEX.

Definition at line 210 of file ParserOutput.php.

Definition at line 191 of file ParserOutput.php.

Referenced by Article\adjustDisplayTitle(), and getDisplayTitle().

Here is the caller graph for this function:

Definition at line 209 of file ParserOutput.php.

Returns the options from its ParserOptions which have been taken into account to produce this output or false if not available.

Returns:
mixed Array

Definition at line 438 of file ParserOutput.php.

Definition at line 207 of file ParserOutput.php.

Definition at line 234 of file ParserOutput.php.

Get or set the prevent-clickjacking flag.

Since:
1.24
Parameters:
boolean | null$flagNew flag value, or null to leave it unchanged
Returns:
boolean Old flag value

Definition at line 460 of file ParserOutput.php.

References wfSetVar().

Here is the call graph for this function:

Callback passed by the Parser to the ParserOptions to keep track of which options are used.

Access:
private

Definition at line 449 of file ParserOutput.php.

callback used by getText to replace editsection tokens

Access:
private

Definition at line 171 of file ParserOutput.php.

References $wgLang, $wgOut, and Title\newFromText().

Here is the call graph for this function:

Definition at line 214 of file ParserOutput.php.

References wfSetVar().

Here is the call graph for this function:

Override the title to be used for display.

-- this is assumed to have been validated (check equal normalisation, etc.)

Parameters:
$textString: desired title text

Definition at line 385 of file ParserOutput.php.

References setProperty(), and setTitleText().

Here is the call graph for this function:

Definition at line 218 of file ParserOutput.php.

References $t, and wfSetVar().

Here is the call graph for this function:

ParserOutput::setFlag ( flag)

Fairly generic flag setter thingy.

Definition at line 406 of file ParserOutput.php.

Definition at line 219 of file ParserOutput.php.

References wfSetVar().

Here is the call graph for this function:

Definition at line 213 of file ParserOutput.php.

References wfSetVar().

Here is the call graph for this function:

Definition at line 231 of file ParserOutput.php.

ParserOutput::setProperty ( name,
value 
)

Set a property to be cached in the DB.

Definition at line 417 of file ParserOutput.php.

Referenced by setDisplayTitle().

Here is the caller graph for this function:

Definition at line 217 of file ParserOutput.php.

References wfSetVar().

Here is the call graph for this function:

ParserOutput::setText ( text)

Definition at line 212 of file ParserOutput.php.

References wfSetVar().

Here is the call graph for this function:

ParserOutput::setTimestamp ( timestamp)

Definition at line 221 of file ParserOutput.php.

References wfSetVar().

Here is the call graph for this function:

Definition at line 216 of file ParserOutput.php.

References $t, and wfSetVar().

Referenced by setDisplayTitle().

Here is the call graph for this function:

Here is the caller graph for this function:

ParserOutput::setTOCHTML ( tochtml)

Definition at line 220 of file ParserOutput.php.

References wfSetVar().

Here is the call graph for this function:


Member Data Documentation

ParserOutput::$mAccessedOptions = array() [private]

Definition at line 144 of file ParserOutput.php.

ParserOutput::$mCategories

Definition at line 117 of file ParserOutput.php.

ParserOutput::$mEditSectionTokens = false

Definition at line 139 of file ParserOutput.php.

ParserOutput::$mExternalLinks = array()

Definition at line 126 of file ParserOutput.php.

ParserOutput::$mFileSearchOptions = array()

Definition at line 125 of file ParserOutput.php.

ParserOutput::$mHeadItems = array()

Definition at line 131 of file ParserOutput.php.

ParserOutput::$mHideNewSection = false

Definition at line 129 of file ParserOutput.php.

ParserOutput::$mImages = array()

Definition at line 124 of file ParserOutput.php.

ParserOutput::$mIndexPolicy = '' [private]

Definition at line 143 of file ParserOutput.php.

ParserOutput::$mInterwikiLinks = array()

Definition at line 127 of file ParserOutput.php.

ParserOutput::$mLanguageLinks

Definition at line 117 of file ParserOutput.php.

ParserOutput::$mLinks = array()

Definition at line 121 of file ParserOutput.php.

ParserOutput::$mModuleMessages = array()

Definition at line 135 of file ParserOutput.php.

ParserOutput::$mModules = array()

Definition at line 132 of file ParserOutput.php.

ParserOutput::$mModuleScripts = array()

Definition at line 133 of file ParserOutput.php.

ParserOutput::$mModuleStyles = array()

Definition at line 134 of file ParserOutput.php.

ParserOutput::$mNewSection = false

Definition at line 128 of file ParserOutput.php.

ParserOutput::$mNoGallery = false

Definition at line 130 of file ParserOutput.php.

ParserOutput::$mOutputHooks = array()

Definition at line 136 of file ParserOutput.php.

ParserOutput::$mPreventClickjacking = false [private]

Definition at line 145 of file ParserOutput.php.

ParserOutput::$mProperties = array()

Definition at line 140 of file ParserOutput.php.

ParserOutput::$mSections = array()

Definition at line 138 of file ParserOutput.php.

ParserOutput::$mTemplateIds = array()

Definition at line 123 of file ParserOutput.php.

ParserOutput::$mTemplates = array()

Definition at line 122 of file ParserOutput.php.

ParserOutput::$mText

Definition at line 117 of file ParserOutput.php.

ParserOutput::$mTimestamp

Definition at line 141 of file ParserOutput.php.

ParserOutput::$mTitleText

Definition at line 117 of file ParserOutput.php.

ParserOutput::$mTOCHTML = ''

Definition at line 141 of file ParserOutput.php.

ParserOutput::$mWarnings = array()

Definition at line 137 of file ParserOutput.php.

const ParserOutput::EDITSECTION_REGEX = '#<(?:mw:)?editsection page="(.*?)" section="(.*?)"(?:/>|>(.*?)(</(?:mw:)?editsection>))#'

Definition at line 147 of file ParserOutput.php.

Referenced by getText(), and MWTidyWrapper\getWrapped().


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