MediaWiki
master
|
Public Member Functions | |
__construct ( $text=null, $languageLinks=[], $categoryLinks=[], $unused=false, $titletext='') | |
__get ( $name) | |
__set ( $name, $value) | |
__sleep () | |
__wakeup () | |
addCacheMessage (string $msg) | |
Adds a comment notice about cache state to the text of the page. More... | |
addCategory ( $c, $sort='') | |
Add a category. More... | |
addExternalLink ( $url) | |
addExtraCSPDefaultSrc ( $src) | |
Add an extra value to Content-Security-Policy default-src directive. More... | |
addExtraCSPScriptSrc ( $src) | |
Add an extra value to Content-Security-Policy script-src directive. More... | |
addExtraCSPStyleSrc ( $src) | |
Add an extra value to Content-Security-Policy style-src directive. More... | |
addHeadItem ( $section, $tag=false) | |
Add some text to the "<head>". More... | |
addImage ( $name, $timestamp=null, $sha1=null) | |
Register a file dependency for this output. More... | |
addInterwikiLink ( $link) | |
addJsConfigVars ( $keys, $value=null) | |
Add one or more variables to be set in mw.config in JavaScript. More... | |
addLanguageLink ( $t) | |
addLink (LinkTarget $link, $id=null) | |
Record a local or interwiki inline link for saving in future link tables. More... | |
addModules ( $modules) | |
addModuleStyles ( $modules) | |
addOutputHook ( $hook, $data=false) | |
addOutputPageMetadata (OutputPage $out) | |
Accommodate very basic transcluding of a temporary OutputPage object into parser output. More... | |
addTemplate ( $link, $page_id, $rev_id) | |
Register a template dependency for this output. More... | |
addTrackingCategory ( $msg, PageReference $page) | |
Add a tracking category, getting the title from a system message, or print a debug message if the title is invalid. More... | |
addWarning ( $s) | |
addWarningMsg (string $msg,... $args) | |
Add a warning to the output for this page. More... | |
addWrapperDivClass ( $class) | |
Add a CSS class to use for the wrapping div. More... | |
appendExtensionData (string $key, $value, string $strategy=self::MW_MERGE_STRATEGY_UNION) | |
Appends arbitrary data to this ParserObject. More... | |
appendJsConfigVar (string $key, string $value, string $strategy=self::MW_MERGE_STRATEGY_UNION) | |
Append a value to a variable to be set in mw.config in JavaScript. More... | |
clearWrapperDivClass () | |
Clears the CSS class to use for the wrapping div, effectively disabling the wrapper div until addWrapperDivClass() is called. More... | |
collectMetadata (ContentMetadataCollector $metadata) | |
Adds the metadata collected in this ParserOutput to the supplied ContentMetadataCollector. More... | |
finalizeAdaptiveCacheExpiry () | |
Call this when parsing is done to lower the TTL based on low parse times. More... | |
getAllFlags () | |
& | getCategories () |
getCategoryLinks () | |
Return the names of the categories on this page. More... | |
getCategoryNames () | |
Return the names of the categories on this page. More... | |
getDisplayTitle () | |
Get the title to be used for display. More... | |
getEnableOOUI () | |
getExtensionData ( $key) | |
Gets extensions data previously attached to this ParserOutput using setExtensionData(). More... | |
& | getExternalLinks () |
getExtraCSPDefaultSrcs () | |
Get extra Content-Security-Policy 'default-src' directives. More... | |
getExtraCSPScriptSrcs () | |
Get extra Content-Security-Policy 'script-src' directives. More... | |
getExtraCSPStyleSrcs () | |
Get extra Content-Security-Policy 'style-src' directives. More... | |
& | getFileSearchOptions () |
getFlag ( $flag) | |
getHeadItems () | |
getHideNewSection () | |
& | getImages () |
getIndexPolicy () | |
getIndicators () | |
getInterwikiLinks () | |
getJsConfigVars (bool $showStrategyKeys=false) | |
& | getLanguageLinks () |
getLimitReportData () | |
getLimitReportJSData () | |
& | getLinks () |
& | getLinksSpecial () |
getModules () | |
getModuleStyles () | |
getNewSection () | |
getNoGallery () | |
getOutputFlag (string $name) | |
Provides a uniform interface to various boolean flags stored in the ParserOutput. More... | |
getOutputHooks () | |
getPageProperties () | |
Return all the page properties set on this ParserOutput. More... | |
getPageProperty (string $name) | |
Look up a page property. More... | |
getPreventClickjacking () | |
Get the prevent-clickjacking flag. More... | |
getProperties () | |
getProperty ( $name) | |
getRawText () | |
Get the cacheable text with <mw:editsection> markers still in it. More... | |
getRevisionTimestampUsed () | |
getRevisionUsedSha1Base36 () | |
getSections () | |
getSpeculativePageIdUsed () | |
getSpeculativeRevIdUsed () | |
& | getTemplateIds () |
& | getTemplates () |
getText ( $options=[]) | |
Get the output HTML. More... | |
getTimeSinceStart ( $clock) | |
Returns the time since resetParseStartTime() was last called. More... | |
getTimestamp () | |
getTitleText () | |
getTOCHTML () | |
getWarnings () | |
getWrapperDivClass () | |
Returns the class (or classes) to be used with the wrapper div for this output. More... | |
hasDynamicContent () | |
hasReducedExpiry () | |
Check whether the cache TTL was lowered from the site default. More... | |
hasText () | |
Returns true if text was passed to the constructor, or set using setText(). More... | |
hideNewSection ( $value) | |
mergeHtmlMetaDataFrom (ParserOutput $source) | |
Merges HTML metadata such as head items, JS config vars, and HTTP cache control info from $source into this ParserOutput. More... | |
mergeInternalMetaDataFrom (ParserOutput $source) | |
Merges internal metadata such as flags, accessed options, and profiling info from $source into this ParserOutput. More... | |
mergeTrackingMetaDataFrom (ParserOutput $source) | |
Merges dependency tracking metadata such as backlinks, images used, and extension data from $source into this ParserOutput. More... | |
preventClickjacking ( $flag) | |
Get or set the prevent-clickjacking flag. More... | |
resetParseStartTime () | |
Resets the parse start timestamps for future calls to getTimeSinceStart() More... | |
setCategories (array $c) | |
Overwrite the category map. More... | |
setCategoryLinks ( $cl) | |
setDisplayTitle ( $text) | |
Override the title to be used for display. More... | |
setEnableOOUI (bool $enable=false) | |
Enables OOUI, if true, in any OutputPage instance this ParserOutput object is added to. More... | |
setExtensionData ( $key, $value) | |
Attaches arbitrary data to this ParserObject. More... | |
setFlag ( $flag) | |
Attach a flag to the output so that it can be checked later to handle special cases. More... | |
setHideNewSection (bool $value) | |
setIndexPolicy ( $policy) | |
setIndicator ( $id, $content) | |
setJsConfigVar (string $key, $value) | |
Add a variable to be set in mw.config in JavaScript. More... | |
setLanguageLinks ( $ll) | |
setLimitReportData ( $key, $value) | |
Sets parser limit report data for a key. More... | |
setNewSection ( $value) | |
setNoGallery ( $value) | |
setOutputFlag (string $name, bool $val=true) | |
Provides a uniform interface to various boolean flags stored in the ParserOutput. More... | |
setPageProperty (string $name, $value) | |
Set a page property to be stored in the page_props database table. More... | |
setPreventClickjacking (bool $flag) | |
Set the prevent-clickjacking flag. More... | |
setProperty ( $name, $value) | |
Sets a page property to be stored in the page_props database table. More... | |
setRevisionTimestampUsed ( $timestamp) | |
setRevisionUsedSha1Base36 ( $hash) | |
setSections ( $toc) | |
setSpeculativePageIdUsed ( $id) | |
setSpeculativeRevIdUsed ( $id) | |
setText ( $text) | |
Set the text of the ParserOutput. More... | |
setTimestamp ( $timestamp) | |
setTitleText ( $t) | |
setTOCHTML ( $tochtml) | |
unsetPageProperty (string $name) | |
Remove a page property. More... | |
unsetProperty ( $name) | |
updateRuntimeAdaptiveExpiry ( $ttl) | |
Lower the runtime adaptive TTL to at most this value. More... | |
![]() | |
expired ( $touched) | |
Return true if this cached output object predates the global or per-article cache invalidation timestamps, or if it comes from an incompatible older version. More... | |
getCacheExpiry () | |
Returns the number of seconds after which this object should expire. More... | |
getCacheRevisionId () | |
getCacheTime () | |
getUsedOptions () | |
Returns the options from its ParserOptions which have been taken into account to produce the output. More... | |
isCacheable () | |
isDifferentRevision ( $id) | |
Return true if this cached output object is for a different revision of the page. More... | |
recordOption (string $option) | |
Tags a parser option for use in the cache key for this parser output. More... | |
recordOptions (array $options) | |
Tags a list of parser option names for use in the cache key for this parser output. More... | |
setCacheRevisionId ( $id) | |
setCacheTime ( $t) | |
setCacheTime() sets the timestamp expressing when the page has been rendered. More... | |
updateCacheExpiry ( $seconds) | |
Sets the number of seconds after which this object should expire. More... | |
Static Public Member Functions | |
static | isLinkInternal ( $internal, $url) |
Checks, if a url is pointing to the own server. More... | |
static | newFromJsonArray (JsonUnserializer $unserializer, array $json) |
Creates a new instance of the class and initialized it from the $json array. More... | |
Public Attributes | |
const | MW_MERGE_STRATEGY_KEY = '_mw-strategy' |
const | MW_MERGE_STRATEGY_UNION = 'union' |
Merge strategy to use for ParserOutput accumulators: "union" means that values are strings, stored as a set, and exposed as a PHP associative array mapping from values to true . More... | |
const | SUPPORTS_STATELESS_TRANSFORMS = 1 |
Feature flags to indicate to extensions that MediaWiki core supports and uses getText() stateless transforms. More... | |
const | SUPPORTS_UNWRAP_TRANSFORM = 1 |
Protected Member Functions | |
initFromJson (JsonUnserializer $unserializer, array $jsonData) | |
Initialize member fields from an array returned by jsonSerialize(). More... | |
toJsonArray () | |
Returns a JSON serializable structure representing this ParserOutput instance. More... | |
Private Member Functions | |
renderDebugInfo () | |
Static Private Member Functions | |
static | detectAndDecodeBinary (array $properties) |
Finds any associative arrays that represent encoded binary strings, and replaces them with the decoded binary data. More... | |
static | detectAndEncodeBinary (array $properties) |
Finds any non-utf8 strings in the given array and replaces them with an associative array that wraps a base64 encoded version of the data. More... | |
static | getTimes ( $clock=null) |
static | merge2D (array $a, array $b) |
static | mergeList (array $a, array $b) |
static | mergeMap (array $a, array $b) |
static | mergeMapStrategy (array $a, array $b) |
static | mergeMixedList (array $a, array $b) |
static | useEachMinValue (array $a, array $b) |
static | useMaxValue ( $a, $b) |
static | useMinValue ( $a, $b) |
Private Attributes | |
string | $mCacheMessage = '' |
Debug message added by ParserCache. More... | |
array< string, string > | $mCategories |
Map of category names to sort keys. More... | |
bool | $mEnableOOUI = false |
Whether OOUI should be enabled. More... | |
array | $mExtensionData = [] |
extra data used by extensions. More... | |
array | $mExternalLinks = [] |
External link URLs, in the key only. More... | |
array | $mExtraDefaultSrcs = [] |
Extra default-src for CSP [Everything but script and style]. More... | |
array | $mExtraScriptSrcs = [] |
Extra script-src for CSP. More... | |
array | $mExtraStyleSrcs = [] |
Extra style-src for CSP. More... | |
array | $mFileSearchOptions = [] |
DB keys of the images used mapped to sha1 and MW timestamp. More... | |
array | $mFlags = [] |
Generic flags. More... | |
array | $mHeadItems = [] |
Items to put in the <head> section. More... | |
bool | $mHideNewSection = false |
Hide the new section link? More... | |
array | $mImages = [] |
DB keys of the images used, in the array key only. More... | |
bool | $mIndexSet = false |
Whether the index policy has been set to 'index'. More... | |
array | $mIndicators = [] |
Page status indicators, usually displayed in top-right corner. More... | |
array | $mInterwikiLinks = [] |
2-D map of prefix/DBK (in keys only) for the inline interwiki links in the document. More... | |
array | $mJsConfigVars = [] |
JavaScript config variable for mw.config combined with this page. More... | |
array | $mLanguageLinks |
List of the full text of language links, in the order they appear. More... | |
array | $mLimitReportData = [] |
Parser limit report data. More... | |
array | $mLimitReportJSData = [] |
Parser limit report data for JSON. More... | |
int[][] | $mLinks = [] |
2-D map of NS/DBK to ID for the links in the document. More... | |
array | $mLinksSpecial = [] |
Keys are DBKs for the links to special pages in the document. More... | |
int | $mMaxAdaptiveExpiry = INF |
Upper bound of expiry based on parse duration. More... | |
array | $mModules = [] |
Modules to be loaded by ResourceLoader. More... | |
array | $mModuleStyles = [] |
Modules of which only the CSSS will be loaded by ResourceLoader. More... | |
bool | $mNewSection = false |
Show a new section link? More... | |
bool | $mNoGallery = false |
No gallery on category page? (NOGALLERY). More... | |
bool | $mNoIndexSet = false |
Whether the index policy has been set to 'noindex'. More... | |
array | $mOutputHooks = [] |
Hook tags as per $wgParserOutputHooks. More... | |
array | $mParseStartTime = [] |
Timestamps for getTimeSinceStart(). More... | |
bool | $mPreventClickjacking = false |
Whether to emit X-Frame-Options: DENY. More... | |
array | $mProperties = [] |
Name/value pairs to be cached in the DB. More... | |
array | $mSections = [] |
Table of contents. More... | |
int null | $mSpeculativeRevId |
Assumed rev ID for {{REVISIONID}} if no revision is set. More... | |
array | $mTemplateIds = [] |
2-D map of NS/DBK to rev ID for the template references. More... | |
array | $mTemplates = [] |
2-D map of NS/DBK to ID for the template references. More... | |
string null | $mText = null |
The output text. More... | |
string | $mTimestamp |
Timestamp of the revision. More... | |
string | $mTitleText |
Title text of the chosen language variant, as HTML. More... | |
string | $mTOCHTML = '' |
HTML of the TOC. More... | |
array< string, array > | $mWarningMsgs = [] |
Unformatted warning messages and arguments to be returned to the user. More... | |
array | $mWarnings = [] |
Warning text to be returned to the user. More... | |
$mWrapperDivClasses = [] | |
string CSS classes to use for the wrapping div, stored in the array keys. More... | |
string null | $revisionTimestampUsed |
Assumed rev timestamp for {{REVISIONTIMESTAMP}} if no revision is set. More... | |
string null | $revisionUsedSha1Base36 |
SHA-1 base 36 hash of any self-transclusion. More... | |
int null | $speculativePageIdUsed |
Assumed page ID for {{PAGEID}} if no revision is set. More... | |
const | EDITSECTION_REGEX |
const | FAST_AR_TTL = 60 |
const | MIN_AR_TTL = 15 |
const | PARSE_FAST_SEC = 0.100 |
const | PARSE_SLOW_SEC = 1.0 |
const | SLOW_AR_TTL = 3600 |
Additional Inherited Members | |
![]() | |
int null | $mCacheExpiry = null |
Seconds after which the object should expire, use 0 for not cacheable. More... | |
int null | $mCacheRevisionId = null |
Revision ID that was parsed. More... | |
string int | $mCacheTime = '' |
TS_MW timestamp when this object was generated, or -1 for not cacheable. More... | |
true[] | $mParseUsedOptions = [] |
ParserOptions which have been taken into account to produce output, option names stored in array keys. More... | |
Definition at line 38 of file ParserOutput.php.
ParserOutput::__construct | ( | $text = null , |
|
$languageLinks = [] , |
|||
$categoryLinks = [] , |
|||
$unused = false , |
|||
$titletext = '' |
|||
) |
string | null | $text | HTML. Use null to indicate that this ParserOutput contains only meta-data, and the HTML output is undetermined, as opposed to empty. Passing null here causes hasText() to return false. In 1.39 the default value changed from '' to null. |
array | $languageLinks | |
array | $categoryLinks | |
bool | $unused | |
string | $titletext |
Definition at line 330 of file ParserOutput.php.
ParserOutput::__get | ( | $name | ) |
Reimplemented from CacheTime.
Definition at line 2609 of file ParserOutput.php.
References wfDeprecatedMsg().
ParserOutput::__set | ( | $name, | |
$value | |||
) |
Reimplemented from CacheTime.
Definition at line 2624 of file ParserOutput.php.
References wfDeprecatedMsg().
ParserOutput::__sleep | ( | ) |
Definition at line 2092 of file ParserOutput.php.
ParserOutput::__wakeup | ( | ) |
Reimplemented from CacheTime.
Definition at line 2596 of file ParserOutput.php.
ParserOutput::addCacheMessage | ( | string | $msg | ) |
Adds a comment notice about cache state to the text of the page.
string | $msg |
Definition at line 575 of file ParserOutput.php.
Referenced by Parser\RevisionOutputCache\save(), and ParserCache\save().
ParserOutput::addCategory | ( | $c, | |
$sort = '' |
|||
) |
Add a category.
string | $c | The category name |
string | $sort | The sort key |
Definition at line 933 of file ParserOutput.php.
ParserOutput::addExternalLink | ( | $url | ) |
Definition at line 1053 of file ParserOutput.php.
ParserOutput::addExtraCSPDefaultSrc | ( | $src | ) |
Add an extra value to Content-Security-Policy default-src directive.
Call this if you are including a resource (e.g. image) from a third party domain. This is used for all source types except style and script.
string | $src | CSP source e.g. example.com |
Definition at line 2041 of file ParserOutput.php.
ParserOutput::addExtraCSPScriptSrc | ( | $src | ) |
Add an extra value to Content-Security-Policy script-src directive.
Call this if you are loading third-party Javascript
string | $src | CSP source e.g. example.com |
Definition at line 2063 of file ParserOutput.php.
ParserOutput::addExtraCSPStyleSrc | ( | $src | ) |
Add an extra value to Content-Security-Policy style-src directive.
string | $src | CSP source e.g. example.com |
Definition at line 2051 of file ParserOutput.php.
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.
string | $section | |
string | bool | $tag |
Definition at line 1164 of file ParserOutput.php.
ParserOutput::addImage | ( | $name, | |
$timestamp = null , |
|||
$sha1 = null |
|||
) |
Register a file dependency for this output.
string | $name | Title dbKey |
string | false | null | $timestamp | MW timestamp of file creation (or false if non-existing) |
string | false | null | $sha1 | Base 36 SHA-1 of file (or false if non-existing) |
Definition at line 1113 of file ParserOutput.php.
ParserOutput::addInterwikiLink | ( | $link | ) |
LinkTarget | $link | LinkTarget object, must be an interwiki link (used to require Title until 1.38). |
MWException | If given invalid input |
Definition at line 1146 of file ParserOutput.php.
ParserOutput::addJsConfigVars | ( | $keys, | |
$value = null |
|||
) |
Add one or more variables to be set in mw.config in JavaScript.
string | array | $keys | Key or array of key/value pairs. |
mixed | null | $value | [optional] Value of the configuration variable. |
Definition at line 1207 of file ParserOutput.php.
References $keys.
ParserOutput::addLanguageLink | ( | $t | ) |
Definition at line 966 of file ParserOutput.php.
ParserOutput::addLink | ( | LinkTarget | $link, |
$id = null |
|||
) |
Record a local or interwiki inline link for saving in future link tables.
LinkTarget | $link | (used to require Title until 1.38) |
int | null | $id | Optional known page_id so we can skip the lookup |
Definition at line 1077 of file ParserOutput.php.
Referenced by WikitextContentHandler\fillParserOutput().
ParserOutput::addModules | ( | $modules | ) |
string[] | $modules |
Definition at line 1176 of file ParserOutput.php.
References wfDeprecated().
ParserOutput::addModuleStyles | ( | $modules | ) |
string[] | $modules |
Definition at line 1189 of file ParserOutput.php.
References wfDeprecated().
Referenced by JsonContentHandler\fillParserOutput(), and WikitextContentHandler\fillParserOutput().
ParserOutput::addOutputHook | ( | $hook, | |
$data = false |
|||
) |
callable | $hook | |
mixed | $data |
Definition at line 1001 of file ParserOutput.php.
ParserOutput::addOutputPageMetadata | ( | OutputPage | $out | ) |
Accommodate very basic transcluding of a temporary OutputPage object into parser output.
This is a fragile method that cannot be relied upon in any meaningful way. It exists solely to support the wikitext feature of transcluding a SpecialPage, and only has to work for that use case to ensure relevant styles are loaded, and that essential config vars needed between SpecialPage and a JS feature are added.
This relies on there being no overlap between modules or config vars added by the SpecialPage and those added by parser extensions. If there is overlap, then arise and break one or both sides. This is expected and unsupported.
OutputPage | $out |
Definition at line 1297 of file ParserOutput.php.
ParserOutput::addTemplate | ( | $link, | |
$page_id, | |||
$rev_id | |||
) |
Register a template dependency for this output.
LinkTarget | $link | (used to require Title until 1.38) |
int | $page_id | |
int | $rev_id |
Definition at line 1127 of file ParserOutput.php.
ParserOutput::addTrackingCategory | ( | $msg, | |
PageReference | $page | ||
) |
Add a tracking category, getting the title from a system message, or print a debug message if the title is invalid.
Any message used with this function should be registered so it will show up on Special:TrackingCategories. Core messages should be added to TrackingCategories::CORE_TRACKING_CATEGORIES, and extensions should add to "TrackingCategories" in their extension.json.
string | $msg | Message key |
PageReference | $page | the page which is being tracked (used to require a Title until 1.38) |
Definition at line 1337 of file ParserOutput.php.
ParserOutput::addWarning | ( | $s | ) |
Definition at line 973 of file ParserOutput.php.
ParserOutput::addWarningMsg | ( | string | $msg, |
$args | |||
) |
Add a warning to the output for this page.
string | $msg | The localization message key for the warning |
mixed | ...$args Optional arguments for the message |
Definition at line 984 of file ParserOutput.php.
ParserOutput::addWrapperDivClass | ( | $class | ) |
Add a CSS class to use for the wrapping div.
If no class is given, no wrapper is added.
string | $class |
Definition at line 584 of file ParserOutput.php.
ParserOutput::appendExtensionData | ( | string | $key, |
$value, | |||
string | $strategy = self::MW_MERGE_STRATEGY_UNION |
||
) |
Appends arbitrary data to this ParserObject.
This can be used to store some information in the ParserOutput object for later use during page output. The data will be cached along with the ParserOutput object, but unlike data set using setPageProperty(), it is not recorded in the database.
See setExtensionData() for more details on rationale and use.
In order to provide for out-of-order/asynchronous/incremental parsing, this method appends values to a set. See setExtensionData() for the flag-like version of this method.
string | $key | The key for accessing the data. Extensions should take care to avoid conflicts in naming keys. It is suggested to use the extension's name as a prefix. |
int | string | $value | The value to append to the list. |
string | $strategy | Merge strategy: only MW_MERGE_STRATEGY_UNION is currently supported and external callers should treat this parameter as |
Definition at line 1747 of file ParserOutput.php.
ParserOutput::appendJsConfigVar | ( | string | $key, |
string | $value, | ||
string | $strategy = self::MW_MERGE_STRATEGY_UNION |
||
) |
Append a value to a variable to be set in mw.config in JavaScript.
In order to ensure the result is independent of the parse order, the value of this key will be an associative array, mapping all of the values set under that key to true. (The array is implicitly ordered in PHP, but you should treat it as unordered.) If you want a non-array type for the key, and can ensure that only a single value will be set, you should use ::setJsConfigVar() instead.
string | $key | Key to use under mw.config |
string | $value | Value to append to the configuration variable. |
string | $strategy | Merge strategy: only MW_MERGE_STRATEGY_UNION is currently supported and external callers should treat this parameter as |
Definition at line 1261 of file ParserOutput.php.
ParserOutput::clearWrapperDivClass | ( | ) |
Clears the CSS class to use for the wrapping div, effectively disabling the wrapper div until addWrapperDivClass() is called.
Definition at line 592 of file ParserOutput.php.
Referenced by CssContentHandler\fillParserOutput(), JavaScriptContentHandler\fillParserOutput(), and TextContentHandler\fillParserOutput().
ParserOutput::collectMetadata | ( | ContentMetadataCollector | $metadata | ) |
Adds the metadata collected in this ParserOutput to the supplied ContentMetadataCollector.
This is similar to ::mergeHtmlMetaDataFrom() but in the opposite direction, since ParserOutput is read/write while ContentMetadataCollector is write-only.
ContentMetadataCollector | $metadata |
Definition at line 2252 of file ParserOutput.php.
|
staticprivate |
Finds any associative arrays that represent encoded binary strings, and replaces them with the decoded binary data.
array | $properties |
Definition at line 2584 of file ParserOutput.php.
|
staticprivate |
Finds any non-utf8 strings in the given array and replaces them with an associative array that wraps a base64 encoded version of the data.
Inverse of detectAndDecodeBinary().
array | $properties |
Definition at line 2560 of file ParserOutput.php.
ParserOutput::finalizeAdaptiveCacheExpiry | ( | ) |
Call this when parsing is done to lower the TTL based on low parse times.
Definition at line 2072 of file ParserOutput.php.
ParserOutput::getAllFlags | ( | ) |
Definition at line 1398 of file ParserOutput.php.
& ParserOutput::getCategories | ( | ) |
Definition at line 711 of file ParserOutput.php.
Referenced by OutputPage\addParserOutputMetadata(), MediaWiki\Deferred\LinksUpdate\CategoryLinksTable\setParserOutput(), and SpecialExpandTemplates\showHtmlPreview().
ParserOutput::getCategoryLinks | ( | ) |
Return the names of the categories on this page.
Definition at line 695 of file ParserOutput.php.
References wfDeprecated().
ParserOutput::getCategoryNames | ( | ) |
Return the names of the categories on this page.
Unlike ::getCategories(), sort keys are not included in the return value.
Definition at line 707 of file ParserOutput.php.
Referenced by MediaWiki\Search\ParserOutputSearchDataExtractor\getCategories().
ParserOutput::getDisplayTitle | ( | ) |
Get the title to be used for display.
As per the contract of setDisplayTitle(), this is safe HTML, ready to be served to the client.
Definition at line 1367 of file ParserOutput.php.
References $t.
ParserOutput::getEnableOOUI | ( | ) |
Definition at line 846 of file ParserOutput.php.
Referenced by OutputPage\addParserOutputMetadata().
ParserOutput::getExtensionData | ( | $key | ) |
Gets extensions data previously attached to this ParserOutput using setExtensionData().
Typically, such data would be set while parsing the page, e.g. by a parser function.
string | $key | The key to look up. |
Definition at line 1779 of file ParserOutput.php.
& ParserOutput::getExternalLinks | ( | ) |
Definition at line 762 of file ParserOutput.php.
Referenced by MediaWiki\Search\ParserOutputSearchDataExtractor\getExternalLinks(), and MediaWiki\Deferred\LinksUpdate\ExternalLinksTable\setParserOutput().
ParserOutput::getExtraCSPDefaultSrcs | ( | ) |
Get extra Content-Security-Policy 'default-src' directives.
Definition at line 855 of file ParserOutput.php.
Referenced by OutputPage\addParserOutputMetadata().
ParserOutput::getExtraCSPScriptSrcs | ( | ) |
Get extra Content-Security-Policy 'script-src' directives.
Definition at line 864 of file ParserOutput.php.
Referenced by OutputPage\addParserOutputMetadata().
ParserOutput::getExtraCSPStyleSrcs | ( | ) |
Get extra Content-Security-Policy 'style-src' directives.
Definition at line 873 of file ParserOutput.php.
Referenced by OutputPage\addParserOutputMetadata().
& ParserOutput::getFileSearchOptions | ( | ) |
Definition at line 758 of file ParserOutput.php.
Referenced by OutputPage\addParserOutputMetadata().
ParserOutput::getFlag | ( | $flag | ) |
string | $flag |
Definition at line 1390 of file ParserOutput.php.
ParserOutput::getHeadItems | ( | ) |
Definition at line 774 of file ParserOutput.php.
Referenced by OutputPage\addParserOutputMetadata().
ParserOutput::getHideNewSection | ( | ) |
Definition at line 1026 of file ParserOutput.php.
Referenced by OutputPage\addParserOutputMetadata().
& ParserOutput::getImages | ( | ) |
Definition at line 754 of file ParserOutput.php.
Referenced by OutputPage\addParserOutputMetadata(), and MediaWiki\Deferred\LinksUpdate\ImageLinksTable\setParserOutput().
ParserOutput::getIndexPolicy | ( | ) |
Definition at line 817 of file ParserOutput.php.
ParserOutput::getIndicators | ( | ) |
Definition at line 719 of file ParserOutput.php.
Referenced by OutputPage\addParserOutputMetadata().
ParserOutput::getInterwikiLinks | ( | ) |
Definition at line 686 of file ParserOutput.php.
Referenced by MediaWiki\Deferred\LinksUpdate\InterwikiLinksTable\setParserOutput().
ParserOutput::getJsConfigVars | ( | bool | $showStrategyKeys = false | ) |
bool | $showStrategyKeys | Defaults to false; if set to true will expose the internal MW_MERGE_STRATEGY_KEY in the result. This should only be used internally to allow safe merge of config vars. |
Definition at line 793 of file ParserOutput.php.
Referenced by OutputPage\addParserOutputContent(), and OutputPage\addParserOutputMetadata().
& ParserOutput::getLanguageLinks | ( | ) |
Definition at line 682 of file ParserOutput.php.
Referenced by OutputPage\addParserOutputMetadata(), and MediaWiki\Deferred\LinksUpdate\LangLinksTable\setParserOutput().
ParserOutput::getLimitReportData | ( | ) |
Definition at line 838 of file ParserOutput.php.
ParserOutput::getLimitReportJSData | ( | ) |
Definition at line 842 of file ParserOutput.php.
Referenced by OutputPage\addParserOutputMetadata().
& ParserOutput::getLinks | ( | ) |
Definition at line 734 of file ParserOutput.php.
Referenced by MediaWiki\Search\ParserOutputSearchDataExtractor\getOutgoingLinks(), and MediaWiki\Deferred\LinksUpdate\PageLinksTable\setParserOutput().
& ParserOutput::getLinksSpecial | ( | ) |
Definition at line 742 of file ParserOutput.php.
ParserOutput::getModules | ( | ) |
Definition at line 778 of file ParserOutput.php.
Referenced by OutputPage\addParserOutputContent(), and OutputPage\addParserOutputMetadata().
ParserOutput::getModuleStyles | ( | ) |
Definition at line 782 of file ParserOutput.php.
Referenced by OutputPage\addParserOutputContent(), and OutputPage\addParserOutputMetadata().
ParserOutput::getNewSection | ( | ) |
Definition at line 1030 of file ParserOutput.php.
Referenced by OutputPage\addParserOutputMetadata().
ParserOutput::getNoGallery | ( | ) |
Definition at line 770 of file ParserOutput.php.
Referenced by OutputPage\addParserOutputMetadata().
ParserOutput::getOutputFlag | ( | string | $name | ) |
Provides a uniform interface to various boolean flags stored in the ParserOutput.
Flags internal to MediaWiki core should have names which are constants in ParserOutputFlags. Extensions should only use ::getOutputFlag() to query flags defined in ParserOutputFlags in core; they should use getExtensionData() to define their own flags.
string | $name | A flag name |
Definition at line 1629 of file ParserOutput.php.
Referenced by MediaWiki\Revision\RenderedRevision\outputVariesOnRevisionMetaData(), and MediaWiki\Storage\PageEditStash\storeStashValue().
ParserOutput::getOutputHooks | ( | ) |
Definition at line 809 of file ParserOutput.php.
Referenced by OutputPage\addParserOutputMetadata().
ParserOutput::getPageProperties | ( | ) |
Return all the page properties set on this ParserOutput.
Definition at line 1550 of file ParserOutput.php.
Referenced by MediaWiki\Deferred\LinksUpdate\PagePropsTable\setParserOutput().
ParserOutput::getPageProperty | ( | string | $name | ) |
Look up a page property.
string | $name | The page property name to look up. |
Definition at line 1532 of file ParserOutput.php.
ParserOutput::getPreventClickjacking | ( | ) |
Get the prevent-clickjacking flag.
Definition at line 1999 of file ParserOutput.php.
Referenced by OutputPage\addParserOutputMetadata().
ParserOutput::getProperties | ( | ) |
Definition at line 1441 of file ParserOutput.php.
References wfDeprecated().
ParserOutput::getProperty | ( | $name | ) |
string | $name | The property name to look up. |
null
if no value was set. Definition at line 1423 of file ParserOutput.php.
References wfDeprecated().
ParserOutput::getRawText | ( | ) |
Get the cacheable text with <mw:editsection> markers still in it.
The return value is suitable for writing back via setText() but is not valid for display to the user.
Definition at line 361 of file ParserOutput.php.
References $mText.
Referenced by WikitextContentHandler\fillParserOutput().
ParserOutput::getRevisionTimestampUsed | ( | ) |
Definition at line 651 of file ParserOutput.php.
Referenced by MediaWiki\Revision\RenderedRevision\outputVariesOnRevisionMetaData().
ParserOutput::getRevisionUsedSha1Base36 | ( | ) |
Definition at line 678 of file ParserOutput.php.
Referenced by MediaWiki\Revision\RenderedRevision\outputVariesOnRevisionMetaData().
ParserOutput::getSections | ( | ) |
Definition at line 730 of file ParserOutput.php.
Referenced by Article\doOutputFromParserCache().
ParserOutput::getSpeculativePageIdUsed | ( | ) |
Definition at line 635 of file ParserOutput.php.
Referenced by MediaWiki\Revision\RenderedRevision\outputVariesOnRevisionMetaData().
ParserOutput::getSpeculativeRevIdUsed | ( | ) |
Definition at line 619 of file ParserOutput.php.
Referenced by MediaWiki\Revision\RenderedRevision\outputVariesOnRevisionMetaData().
& ParserOutput::getTemplateIds | ( | ) |
Definition at line 750 of file ParserOutput.php.
Referenced by OutputPage\addParserOutputMetadata().
& ParserOutput::getTemplates | ( | ) |
Definition at line 746 of file ParserOutput.php.
Referenced by MediaWiki\Search\ParserOutputSearchDataExtractor\getTemplates(), and MediaWiki\Deferred\LinksUpdate\TemplateLinksTable\setParserOutput().
ParserOutput::getText | ( | $options = [] | ) |
Get the output HTML.
array | $options | (since 1.31) Transformations to apply to the HTML
|
Definition at line 401 of file ParserOutput.php.
References Sanitizer\decodeCharReferences(), Sanitizer\decodeTagAttributes(), Html\element(), Linker\expandLocalLinks(), getExtensionData(), RequestContext\getMain(), Title\newFromText(), Html\rawElement(), Parser\replaceTableOfContentsMarker(), Hooks\runner(), and wfUrlencode().
Referenced by OutputPage\addParserOutputText(), Status\getHTML(), and Message\parseText().
|
staticprivate |
Definition at line 1788 of file ParserOutput.php.
ParserOutput::getTimeSinceStart | ( | $clock | ) |
Returns the time since resetParseStartTime() was last called.
Clocks available are:
string | $clock |
Definition at line 1820 of file ParserOutput.php.
ParserOutput::getTimestamp | ( | ) |
Definition at line 834 of file ParserOutput.php.
Referenced by Article\doOutputFromParserCache().
ParserOutput::getTitleText | ( | ) |
Definition at line 723 of file ParserOutput.php.
Referenced by Article\adjustDisplayTitle().
ParserOutput::getTOCHTML | ( | ) |
Definition at line 827 of file ParserOutput.php.
Referenced by OutputPage\addParserOutputMetadata().
ParserOutput::getWarnings | ( | ) |
Definition at line 813 of file ParserOutput.php.
ParserOutput::getWrapperDivClass | ( | ) |
Returns the class (or classes) to be used with the wrapper div for this output.
If there is no wrapper class given, no wrapper div should be added. The wrapper div is added automatically by getText().
Definition at line 603 of file ParserOutput.php.
ParserOutput::hasDynamicContent | ( | ) |
Definition at line 1978 of file ParserOutput.php.
ParserOutput::hasReducedExpiry | ( | ) |
Check whether the cache TTL was lowered from the site default.
When content is determined by more than hard state (e.g. page edits), such as template/file transclusions based on the current timestamp or extension tags that generate lists based on queries, this return true.
This method mainly exists to facilitate the logic in WikiPage::triggerOpportunisticLinksUpdate. As such, beware that reducing the TTL for reasons that do not relate to "dynamic content", may have the side-effect of incurring more RefreshLinksJob executions.
Definition at line 1965 of file ParserOutput.php.
Referenced by WikiPage\triggerOpportunisticLinksUpdate().
ParserOutput::hasText | ( | ) |
Returns true if text was passed to the constructor, or set using setText().
Returns false if null was passed to the $text parameter of the constructor to indicate that this ParserOutput only contains meta-data, and the HTML output is undetermined.
Definition at line 349 of file ParserOutput.php.
Referenced by Parser\RevisionOutputCache\save(), and ParserCache\save().
ParserOutput::hideNewSection | ( | $value | ) |
bool | $value | Hide the new section link? |
Definition at line 1021 of file ParserOutput.php.
|
protected |
Initialize member fields from an array returned by jsonSerialize().
JsonUnserializer | $unserializer | |
array | $jsonData |
Reimplemented from CacheTime.
Definition at line 2502 of file ParserOutput.php.
|
static |
Checks, if a url is pointing to the own server.
string | $internal | The server to check against |
string | $url | The url to check |
Definition at line 1042 of file ParserOutput.php.
|
staticprivate |
Definition at line 2366 of file ParserOutput.php.
ParserOutput::mergeHtmlMetaDataFrom | ( | ParserOutput | $source | ) |
Merges HTML metadata such as head items, JS config vars, and HTTP cache control info from $source into this ParserOutput.
This should be used whenever the HTML in $source has been somehow merged into the HTML of this ParserOutput.
ParserOutput | $source |
Definition at line 2148 of file ParserOutput.php.
ParserOutput::mergeInternalMetaDataFrom | ( | ParserOutput | $source | ) |
Merges internal metadata such as flags, accessed options, and profiling info from $source into this ParserOutput.
This should be used whenever the state of $source has any impact on the state of this ParserOutput.
ParserOutput | $source |
Definition at line 2112 of file ParserOutput.php.
|
staticprivate |
Definition at line 2328 of file ParserOutput.php.
|
staticprivate |
Definition at line 2332 of file ParserOutput.php.
|
staticprivate |
Definition at line 2336 of file ParserOutput.php.
|
staticprivate |
Definition at line 2324 of file ParserOutput.php.
ParserOutput::mergeTrackingMetaDataFrom | ( | ParserOutput | $source | ) |
Merges dependency tracking metadata such as backlinks, images used, and extension data from $source into this ParserOutput.
This allows dependency tracking to be done for the combined output of multiple content slots.
ParserOutput | $source |
Definition at line 2214 of file ParserOutput.php.
|
static |
Creates a new instance of the class and initialized it from the $json array.
JsonUnserializer | $unserializer | an instance of JsonUnserializer to use for nested properties if they need special care. |
array | $json |
Reimplemented from CacheTime.
Definition at line 2491 of file ParserOutput.php.
ParserOutput::preventClickjacking | ( | $flag | ) |
Get or set the prevent-clickjacking flag.
bool | null | $flag | New flag value, or null to leave it unchanged |
Definition at line 2012 of file ParserOutput.php.
|
private |
Definition at line 1872 of file ParserOutput.php.
ParserOutput::resetParseStartTime | ( | ) |
Resets the parse start timestamps for future calls to getTimeSinceStart()
Definition at line 1805 of file ParserOutput.php.
ParserOutput::setCategories | ( | array | $c | ) |
Overwrite the category map.
array<string,string> | $c Map of category names to sort keys |
Definition at line 942 of file ParserOutput.php.
ParserOutput::setCategoryLinks | ( | $cl | ) |
Definition at line 897 of file ParserOutput.php.
References wfDeprecated(), and wfSetVar().
ParserOutput::setDisplayTitle | ( | $text | ) |
Override the title to be used for display.
string | $text | Desired title text |
Definition at line 1354 of file ParserOutput.php.
ParserOutput::setEnableOOUI | ( | bool | $enable = false | ) |
Enables OOUI, if true, in any OutputPage instance this ParserOutput object is added to.
bool | $enable | If OOUI should be enabled or not |
Definition at line 962 of file ParserOutput.php.
ParserOutput::setExtensionData | ( | $key, | |
$value | |||
) |
Attaches arbitrary data to this ParserObject.
This can be used to store some information in the ParserOutput object for later use during page output. The data will be cached along with the ParserOutput object, but unlike data set using setPageProperty(), it is not recorded in the database.
This method is provided to overcome the unsafe practice of attaching extra information to a ParserObject by directly assigning member variables.
To use setExtensionData() to pass extension information from a hook inside the parser to a hook in the page output, use this in the parser hook:
And then later, in OutputPageParserOutput or similar:
In MediaWiki 1.20 and older, you have to use a custom member variable within the ParserOutput object:
string | $key | The key for accessing the data. Extensions should take care to avoid conflicts in naming keys. It is suggested to use the extension's name as a prefix. |
mixed | JsonUnserializable | $value | The value to set. Setting a value to null is equivalent to removing the value. |
Definition at line 1707 of file ParserOutput.php.
ParserOutput::setFlag | ( | $flag | ) |
Attach a flag to the output so that it can be checked later to handle special cases.
string | $flag |
Definition at line 1381 of file ParserOutput.php.
ParserOutput::setHideNewSection | ( | bool | $value | ) |
bool | $value | Hide the new section link? |
Definition at line 1013 of file ParserOutput.php.
ParserOutput::setIndexPolicy | ( | $policy | ) |
Definition at line 910 of file ParserOutput.php.
ParserOutput::setIndicator | ( | $id, | |
$content | |||
) |
ParserOutput::setJsConfigVar | ( | string | $key, |
$value | |||
) |
Add a variable to be set in mw.config in JavaScript.
In order to ensure the result is independent of the parse order, the values set here must be unique – that is, you can pass the same $key multiple times but ONLY if the $value is identical each time. If you want to collect multiple pieces of data under a single key, use ::appendJsConfigVar().
string | $key | Key to use under mw.config |
mixed | null | $value | Value of the configuration variable. |
Definition at line 1231 of file ParserOutput.php.
ParserOutput::setLanguageLinks | ( | $ll | ) |
Definition at line 890 of file ParserOutput.php.
References wfSetVar().
ParserOutput::setLimitReportData | ( | $key, | |
$value | |||
) |
Sets parser limit report data for a key.
The key is used as the prefix for various messages used for formatting:
Note that all values are interpreted as wikitext, and so should be encoded with htmlspecialchars() as necessary, but should avoid complex HTML for display in the "NewPP limit report" comment.
string | $key | Message key |
mixed | $value | Appropriate for Message::params() |
Definition at line 1848 of file ParserOutput.php.
ParserOutput::setNewSection | ( | $value | ) |
Definition at line 1006 of file ParserOutput.php.
ParserOutput::setNoGallery | ( | $value | ) |
Definition at line 766 of file ParserOutput.php.
ParserOutput::setOutputFlag | ( | string | $name, |
bool | $val = true |
||
) |
Provides a uniform interface to various boolean flags stored in the ParserOutput.
Flags internal to MediaWiki core should have names which are constants in ParserOutputFlags. Extensions should use setExtensionData() rather than creating new flags with ::setOutputFlag() in order to prevent namespace conflicts.
Flags are always combined with OR. That is, the flag is set in the resulting ParserOutput if the flag is set in any of the fragments composing the ParserOutput.
string | $name | A flag name |
bool | $val |
Definition at line 1577 of file ParserOutput.php.
Referenced by WikitextContentHandler\fillParserOutput().
ParserOutput::setPageProperty | ( | string | $name, |
$value | |||
) |
Set a page property to be stored in the page_props database table.
page_props is a key value store indexed by the page ID. This allows the parser to set a property on a page which can then be quickly retrieved given the page ID or via a DB join when given the page title.
Since 1.23, page_props are also indexed by numeric value, to allow for efficient "top k" queries of pages wrt a given property.
setPageProperty() is thus used to propagate properties from the parsed page to request contexts other than a page view of the currently parsed article.
Some applications examples:
If you are writing an extension where you want to set a property in the parser which is used by an OutputPageParserOutput hook, you have to associate the extension data directly with the ParserOutput object. Since MediaWiki 1.21, you should use setExtensionData() to do this:
And then later, in OutputPageParserOutput or similar:
In MediaWiki 1.20 and older, you have to use a custom member variable within the ParserOutput object, but this will not work in modern MediaWiki with $wgParserCacheUseJson set to true (the default):
string | $name | |
int | float | string | bool | null | $value |
Definition at line 1517 of file ParserOutput.php.
ParserOutput::setPreventClickjacking | ( | bool | $flag | ) |
Set the prevent-clickjacking flag.
bool | $flag | New flag value |
Definition at line 1989 of file ParserOutput.php.
ParserOutput::setProperty | ( | $name, | |
$value | |||
) |
Sets a page property to be stored in the page_props database table.
string | $name | |
int | float | string | bool | null | $value |
Definition at line 1408 of file ParserOutput.php.
ParserOutput::setRevisionTimestampUsed | ( | $timestamp | ) |
string | $timestamp | TS_MW timestamp |
Definition at line 643 of file ParserOutput.php.
ParserOutput::setRevisionUsedSha1Base36 | ( | $hash | ) |
string | $hash | Lowercase SHA-1 base 36 hash |
Definition at line 659 of file ParserOutput.php.
ParserOutput::setSections | ( | $toc | ) |
Definition at line 906 of file ParserOutput.php.
References wfSetVar().
ParserOutput::setSpeculativePageIdUsed | ( | $id | ) |
ParserOutput::setSpeculativeRevIdUsed | ( | $id | ) |
ParserOutput::setText | ( | $text | ) |
Set the text of the ParserOutput.
If you did not generate html, pass null to mark it as such.
string | null | $text | HTML content of ParserOutput or null if not generated |
Definition at line 886 of file ParserOutput.php.
References wfSetVar().
Referenced by CssContentHandler\fillParserOutput(), FallbackContentHandler\fillParserOutput(), JavaScriptContentHandler\fillParserOutput(), TextContentHandler\fillParserOutput(), JsonContentHandler\fillParserOutput(), WikitextContentHandler\fillParserOutput(), TablePager\getBodyOutput(), and TablePager\getFullOutput().
ParserOutput::setTimestamp | ( | $timestamp | ) |
Definition at line 924 of file ParserOutput.php.
References wfSetVar().
Referenced by Parser\RevisionOutputCache\save().
ParserOutput::setTitleText | ( | $t | ) |
Definition at line 902 of file ParserOutput.php.
References $t, and wfSetVar().
ParserOutput::setTOCHTML | ( | $tochtml | ) |
Definition at line 920 of file ParserOutput.php.
References wfSetVar().
|
protected |
Returns a JSON serializable structure representing this ParserOutput instance.
Reimplemented from CacheTime.
Definition at line 2430 of file ParserOutput.php.
ParserOutput::unsetPageProperty | ( | string | $name | ) |
Remove a page property.
string | $name | The page property name. |
Definition at line 1541 of file ParserOutput.php.
ParserOutput::unsetProperty | ( | $name | ) |
string | $name |
Definition at line 1432 of file ParserOutput.php.
ParserOutput::updateRuntimeAdaptiveExpiry | ( | $ttl | ) |
Lower the runtime adaptive TTL to at most this value.
int | $ttl |
Definition at line 2027 of file ParserOutput.php.
|
staticprivate |
Definition at line 2385 of file ParserOutput.php.
|
staticprivate |
Definition at line 2412 of file ParserOutput.php.
|
staticprivate |
Definition at line 2400 of file ParserOutput.php.
|
private |
Debug message added by ParserCache.
Definition at line 251 of file ParserOutput.php.
|
private |
Map of category names to sort keys.
Definition at line 91 of file ParserOutput.php.
|
private |
Whether OOUI should be enabled.
Definition at line 225 of file ParserOutput.php.
|
private |
extra data used by extensions.
Definition at line 240 of file ParserOutput.php.
|
private |
External link URLs, in the key only.
Definition at line 141 of file ParserOutput.php.
|
private |
Extra default-src for CSP [Everything but script and style].
Definition at line 271 of file ParserOutput.php.
|
private |
Extra script-src for CSP.
Definition at line 266 of file ParserOutput.php.
|
private |
Extra style-src for CSP.
Definition at line 276 of file ParserOutput.php.
|
private |
DB keys of the images used mapped to sha1 and MW timestamp.
Definition at line 136 of file ParserOutput.php.
|
private |
Generic flags.
Definition at line 281 of file ParserOutput.php.
|
private |
Items to put in the <head> section.
Definition at line 167 of file ParserOutput.php.
|
private |
Hide the new section link?
Definition at line 157 of file ParserOutput.php.
|
private |
DB keys of the images used, in the array key only.
Definition at line 131 of file ParserOutput.php.
|
private |
Whether the index policy has been set to 'index'.
Definition at line 230 of file ParserOutput.php.
|
private |
Page status indicators, usually displayed in top-right corner.
Definition at line 96 of file ParserOutput.php.
|
private |
2-D map of prefix/DBK (in keys only) for the inline interwiki links in the document.
Definition at line 147 of file ParserOutput.php.
|
private |
JavaScript config variable for mw.config combined with this page.
Definition at line 182 of file ParserOutput.php.
|
private |
List of the full text of language links, in the order they appear.
Definition at line 86 of file ParserOutput.php.
|
private |
Parser limit report data.
Definition at line 245 of file ParserOutput.php.
|
private |
Parser limit report data for JSON.
Definition at line 248 of file ParserOutput.php.
|
private |
2-D map of NS/DBK to ID for the links in the document.
ID=zero for broken.
Definition at line 108 of file ParserOutput.php.
|
private |
Keys are DBKs for the links to special pages in the document.
Definition at line 114 of file ParserOutput.php.
|
private |
Upper bound of expiry based on parse duration.
Definition at line 306 of file ParserOutput.php.
|
private |
Modules to be loaded by ResourceLoader.
Definition at line 172 of file ParserOutput.php.
|
private |
Modules of which only the CSSS will be loaded by ResourceLoader.
Definition at line 177 of file ParserOutput.php.
|
private |
Show a new section link?
Definition at line 152 of file ParserOutput.php.
|
private |
No gallery on category page? (NOGALLERY).
Definition at line 162 of file ParserOutput.php.
|
private |
Whether the index policy has been set to 'noindex'.
Definition at line 235 of file ParserOutput.php.
|
private |
Hook tags as per $wgParserOutputHooks.
Definition at line 187 of file ParserOutput.php.
|
private |
Timestamps for getTimeSinceStart().
Definition at line 256 of file ParserOutput.php.
|
private |
Whether to emit X-Frame-Options: DENY.
Definition at line 261 of file ParserOutput.php.
|
private |
Name/value pairs to be cached in the DB.
Definition at line 210 of file ParserOutput.php.
|
private |
Table of contents.
Definition at line 205 of file ParserOutput.php.
|
private |
Assumed rev ID for {{REVISIONID}} if no revision is set.
Definition at line 291 of file ParserOutput.php.
|
private |
2-D map of NS/DBK to rev ID for the template references.
ID=zero for broken.
Definition at line 126 of file ParserOutput.php.
|
private |
2-D map of NS/DBK to ID for the template references.
ID=zero for broken.
Definition at line 120 of file ParserOutput.php.
|
private |
The output text.
Definition at line 80 of file ParserOutput.php.
|
private |
Timestamp of the revision.
Definition at line 220 of file ParserOutput.php.
|
private |
Title text of the chosen language variant, as HTML.
Definition at line 101 of file ParserOutput.php.
|
private |
HTML of the TOC.
Definition at line 215 of file ParserOutput.php.
|
private |
Unformatted warning messages and arguments to be returned to the user.
This is for internal use when merging ParserOutputs and are not serialized/deserialized.
Definition at line 200 of file ParserOutput.php.
|
private |
Warning text to be returned to the user.
Wikitext formatted, in the key only.
Definition at line 193 of file ParserOutput.php.
|
private |
string CSS classes to use for the wrapping div, stored in the array keys.
If no class is given, no wrapper is added.
Definition at line 303 of file ParserOutput.php.
|
private |
Assumed rev timestamp for {{REVISIONTIMESTAMP}} if no revision is set.
Definition at line 295 of file ParserOutput.php.
|
private |
SHA-1 base 36 hash of any self-transclusion.
Definition at line 298 of file ParserOutput.php.
|
private |
Assumed page ID for {{PAGEID}} if no revision is set.
Definition at line 293 of file ParserOutput.php.
|
private |
Definition at line 308 of file ParserOutput.php.
|
private |
Definition at line 316 of file ParserOutput.php.
|
private |
Definition at line 318 of file ParserOutput.php.
const ParserOutput::MW_MERGE_STRATEGY_KEY = '_mw-strategy' |
const ParserOutput::MW_MERGE_STRATEGY_UNION = 'union' |
Merge strategy to use for ParserOutput accumulators: "union" means that values are strings, stored as a set, and exposed as a PHP associative array mapping from values to true
.
This constant should be treated as
Definition at line 75 of file ParserOutput.php.
|
private |
Definition at line 314 of file ParserOutput.php.
|
private |
Definition at line 315 of file ParserOutput.php.
|
private |
Definition at line 317 of file ParserOutput.php.
const ParserOutput::SUPPORTS_STATELESS_TRANSFORMS = 1 |
Feature flags to indicate to extensions that MediaWiki core supports and uses getText() stateless transforms.
Definition at line 52 of file ParserOutput.php.
const ParserOutput::SUPPORTS_UNWRAP_TRANSFORM = 1 |
Definition at line 57 of file ParserOutput.php.