MediaWiki REL1_41
|
Set options of the Parser. More...
Public Member Functions | |
__construct (UserIdentity $user, $lang=null) | |
addExtraKey ( $key) | |
Extra key that should be present in the parser cache key. | |
disableContentConversion ( $x=true) | |
Whether content conversion should be disabled. | |
disableTitleConversion ( $x=true) | |
Whether title conversion should be disabled. | |
enableLimitReport ( $x=true) | |
getAllowExternalImages () | |
Allow all external images inline? | |
getAllowExternalImagesFrom () | |
External images to allow. | |
getAllowSpecialInclusion () | |
Allow inclusion of special pages? | |
getAllowUnsafeRawHtml () | |
If the wiki is configured to allow raw html ($wgRawHtml = true) is it allowed in the specific case of parsing this page. | |
getCleanSignatures () | |
Clean up signature texts? | |
getCurrentRevisionRecordCallback () | |
Callback for current revision fetching; first argument to call_user_func(). | |
getDateFormat () | |
Date format index. | |
getDisableContentConversion () | |
Whether content conversion should be disabled. | |
getDisableTitleConversion () | |
Whether title conversion should be disabled. | |
getEnableImageWhitelist () | |
Use the on-wiki external image whitelist? | |
getEnableLimitReport () | |
getExpensiveParserFunctionLimit () | |
Maximum number of calls per parse to expensive parser functions. | |
getExternalLinkTarget () | |
Target attribute for external links. | |
getInterfaceMessage () | |
Parsing an interface message? | |
getInterwikiMagic () | |
Whether to extract interlanguage links. | |
getIsPreview () | |
Parsing the page for a "preview" operation? | |
getIsPrintable () | |
Parsing the printable version of the page? | |
getIsSectionPreview () | |
Parsing the page for a "preview" operation on a single section? | |
getMagicISBNLinks () | |
Are magic ISBN links enabled? | |
getMagicPMIDLinks () | |
Are magic PMID links enabled? | |
getMagicRFCLinks () | |
Are magic RFC links enabled? | |
getMaxIncludeSize () | |
Maximum size of template expansions, in bytes. | |
getMaxPPExpandDepth () | |
Maximum recursion depth in PPFrame::expand() | |
getMaxPPNodeCount () | |
Maximum number of nodes touched by PPFrame::expand() | |
getMaxTemplateDepth () | |
Maximum recursion depth for templates within templates. | |
getOption ( $name) | |
Fetch an option and track that is was accessed. | |
getPreSaveTransform () | |
Transform wiki markup when saving the page? | |
getRedirectTarget () | |
Get the previously-set redirect target. | |
getRemoveComments () | |
Remove HTML comments. | |
getRenderReason () | |
Returns reason for rendering the content. | |
getSpeculativePageId () | |
A guess for {{PAGEID}}, calculated using the callback provided via setSpeculativeRevPageCallback(). | |
getSpeculativeRevId () | |
A guess for {{REVISIONID}}, calculated using the callback provided via setSpeculativeRevIdCallback(). | |
getSuppressTOC () | |
Should the table of contents be suppressed? Used when parsing "code" pages (like JavaScript) as wikitext for backlink support and categories, but where we don't want other metadata generated (like the table of contents). | |
getTargetLanguage () | |
Target language for the parse. | |
getTemplateCallback () | |
Callback for template fetching; first argument to call_user_func(). | |
getThumbSize () | |
Thumb size preferred by the user. | |
getTimestamp () | |
Timestamp used for {{CURRENTDAY}} etc. | |
getUseParsoid () | |
Parsoid-format HTML output, or legacy wikitext parser HTML? | |
getUserIdentity () | |
Get the identity of the user for whom the parse is made. | |
getUserLang () | |
Same as getUserLangObj() but returns a string instead. | |
getUserLangObj () | |
Get the user language used by the parser for this page and split the parser cache. | |
getWrapOutputClass () | |
Class to use to wrap output from Parser::parse() | |
isSafeToCache (array $usedOptions=null) | |
Test whether these options are safe to cache. | |
matches (ParserOptions $other) | |
Check if these options match that of another options set. | |
matchesForCacheKey (ParserOptions $other) | |
optionsHash ( $forOptions, $title=null) | |
Generate a hash string with the values set on these ParserOptions for the keys given in the array. | |
registerWatcher ( $callback) | |
Registers a callback for tracking which ParserOptions which are used. | |
setAllowExternalImages ( $x) | |
Allow all external images inline? | |
setAllowExternalImagesFrom ( $x) | |
External images to allow. | |
setAllowSpecialInclusion ( $x) | |
Allow inclusion of special pages? | |
setAllowUnsafeRawHtml ( $x) | |
If the wiki is configured to allow raw html ($wgRawHtml = true) is it allowed in the specific case of parsing this page. | |
setCleanSignatures ( $x) | |
Clean up signature texts? | |
setCurrentRevisionRecordCallback ( $x) | |
Callback for current revision fetching; first argument to call_user_func(). | |
setDateFormat ( $x) | |
Date format index. | |
setEnableImageWhitelist ( $x) | |
Use the on-wiki external image whitelist? | |
setExpensiveParserFunctionLimit ( $x) | |
Maximum number of calls per parse to expensive parser functions. | |
setExternalLinkTarget ( $x) | |
Target attribute for external links. | |
setInterfaceMessage ( $x) | |
Parsing an interface message? | |
setInterwikiMagic ( $x) | |
Specify whether to extract interlanguage links. | |
setIsPreview ( $x) | |
Parsing the page for a "preview" operation? | |
setIsPrintable ( $x) | |
Parsing the printable version of the page? | |
setIsSectionPreview ( $x) | |
Parsing the page for a "preview" operation on a single section? | |
setMaxIncludeSize ( $x) | |
Maximum size of template expansions, in bytes. | |
setMaxPPNodeCount ( $x) | |
Maximum number of nodes touched by PPFrame::expand() | |
setMaxTemplateDepth ( $x) | |
Maximum recursion depth for templates within templates. | |
setOption ( $name, $value) | |
Set an option, generically. | |
setPreSaveTransform ( $x) | |
Transform wiki markup when saving the page? | |
setRedirectTarget ( $title) | |
Note that setting or changing this does not make the page a redirect or change its target, it merely records the information for reference during the parse. | |
setRemoveComments ( $x) | |
Remove HTML comments. | |
setRenderReason (string $renderReason) | |
Sets reason for rendering the content. | |
setSpeculativePageIdCallback ( $x) | |
Callback to generate a guess for {{PAGEID}}. | |
setSpeculativeRevIdCallback ( $x) | |
Callback to generate a guess for {{REVISIONID}}. | |
setSuppressTOC () | |
Suppress generation of the table of contents. | |
setTargetLanguage ( $x) | |
Target language for the parse. | |
setTemplateCallback ( $x) | |
Callback for template fetching; first argument to call_user_func(). | |
setThumbSize ( $x) | |
Thumb size preferred by the user. | |
setTimestamp ( $x) | |
Timestamp used for {{CURRENTDAY}} etc. | |
setupFakeRevision ( $title, $content, $user) | |
Sets a hook to force that a page exists, and sets a current revision callback to return a revision with custom content when the current revision of the page is requested. | |
setUseParsoid () | |
Request Parsoid-format HTML output. | |
setUserLang ( $x) | |
Set the user language used by the parser for this page and split the parser cache. | |
setWrapOutputClass ( $className) | |
CSS class to use to wrap output from Parser::parse() | |
Static Public Member Functions | |
static | allCacheVaryingOptions () |
Return all option keys that vary the options hash. | |
static | clearStaticCache () |
Reset static caches. | |
static | getLazyOptions () |
Get lazy-loaded options. | |
static | newCanonical ( $context, $userLang=null) |
Creates a "canonical" ParserOptions object. | |
static | newFromAnon () |
Get a ParserOptions object for an anonymous user. | |
static | newFromContext (IContextSource $context) |
Get a ParserOptions object from a IContextSource object. | |
static | newFromUser ( $user) |
Get a ParserOptions object from a given user. | |
static | newFromUserAndLang (UserIdentity $user, Language $lang) |
Get a ParserOptions object from a given user and language. | |
Protected Member Functions | |
setOptionLegacy ( $name, $value) | |
Legacy implementation. | |
Set options of the Parser.
How to add an option in core:
How to add an option in an extension:
Definition at line 51 of file ParserOptions.php.
ParserOptions::__construct | ( | UserIdentity | $user, |
$lang = null ) |
UserIdentity | $user | |
Language | null | $lang |
Definition at line 1060 of file ParserOptions.php.
References $wgLang.
ParserOptions::addExtraKey | ( | $key | ) |
Extra key that should be present in the parser cache key.
string | $key |
Definition at line 1043 of file ParserOptions.php.
|
static |
Return all option keys that vary the options hash.
Definition at line 1373 of file ParserOptions.php.
|
static |
ParserOptions::disableContentConversion | ( | $x = true | ) |
Whether content conversion should be disabled.
bool | null | $x | New value (null is no change) |
Definition at line 567 of file ParserOptions.php.
ParserOptions::disableTitleConversion | ( | $x = true | ) |
Whether title conversion should be disabled.
bool | null | $x | New value (null is no change) |
Definition at line 584 of file ParserOptions.php.
ParserOptions::enableLimitReport | ( | $x = true | ) |
Enable limit report in an HTML comment on output
bool | null | $x | New value (null is no change) |
Definition at line 512 of file ParserOptions.php.
ParserOptions::getAllowExternalImages | ( | ) |
ParserOptions::getAllowExternalImagesFrom | ( | ) |
External images to allow.
When self::getAllowExternalImages() is false
Definition at line 304 of file ParserOptions.php.
ParserOptions::getAllowSpecialInclusion | ( | ) |
ParserOptions::getAllowUnsafeRawHtml | ( | ) |
If the wiki is configured to allow raw html ($wgRawHtml = true) is it allowed in the specific case of parsing this page.
This is meant to disable unsafe parser tags in cases where a malicious user may control the input to the parser.
Definition at line 837 of file ParserOptions.php.
ParserOptions::getCleanSignatures | ( | ) |
Clean up signature texts?
Definition at line 521 of file ParserOptions.php.
ParserOptions::getCurrentRevisionRecordCallback | ( | ) |
Callback for current revision fetching; first argument to call_user_func().
Definition at line 885 of file ParserOptions.php.
ParserOptions::getDateFormat | ( | ) |
ParserOptions::getDisableContentConversion | ( | ) |
Whether content conversion should be disabled.
Definition at line 558 of file ParserOptions.php.
ParserOptions::getDisableTitleConversion | ( | ) |
Whether title conversion should be disabled.
Definition at line 575 of file ParserOptions.php.
Referenced by Parser\parse().
ParserOptions::getEnableImageWhitelist | ( | ) |
Use the on-wiki external image whitelist?
Definition at line 327 of file ParserOptions.php.
ParserOptions::getEnableLimitReport | ( | ) |
Enable limit report in an HTML comment on output
Definition at line 500 of file ParserOptions.php.
ParserOptions::getExpensiveParserFunctionLimit | ( | ) |
Maximum number of calls per parse to expensive parser functions.
Definition at line 460 of file ParserOptions.php.
ParserOptions::getExternalLinkTarget | ( | ) |
Target attribute for external links.
Definition at line 540 of file ParserOptions.php.
ParserOptions::getInterfaceMessage | ( | ) |
ParserOptions::getInterwikiMagic | ( | ) |
Whether to extract interlanguage links.
When true, interlanguage links will be returned by ParserOutput::getLanguageLinks() instead of generating link HTML.
Definition at line 264 of file ParserOptions.php.
ParserOptions::getIsPreview | ( | ) |
Parsing the page for a "preview" operation?
Definition at line 609 of file ParserOptions.php.
ParserOptions::getIsPrintable | ( | ) |
Parsing the printable version of the page?
Definition at line 643 of file ParserOptions.php.
ParserOptions::getIsSectionPreview | ( | ) |
Parsing the page for a "preview" operation on a single section?
Definition at line 626 of file ParserOptions.php.
|
static |
Get lazy-loaded options.
This array should be initialised by the constructor. The return type hint is used as an assertion to ensure this has happened and to coerce the type for static analysis.
Definition at line 198 of file ParserOptions.php.
ParserOptions::getMagicISBNLinks | ( | ) |
Are magic ISBN links enabled?
Definition at line 776 of file ParserOptions.php.
ParserOptions::getMagicPMIDLinks | ( | ) |
Are magic PMID links enabled?
Definition at line 785 of file ParserOptions.php.
ParserOptions::getMagicRFCLinks | ( | ) |
Are magic RFC links enabled?
Definition at line 794 of file ParserOptions.php.
ParserOptions::getMaxIncludeSize | ( | ) |
Maximum size of template expansions, in bytes.
Definition at line 398 of file ParserOptions.php.
Referenced by MediaWiki\Parser\Parsoid\ParsoidParser\makeLimitReport().
ParserOptions::getMaxPPExpandDepth | ( | ) |
Maximum recursion depth in PPFrame::expand()
Definition at line 432 of file ParserOptions.php.
ParserOptions::getMaxPPNodeCount | ( | ) |
Maximum number of nodes touched by PPFrame::expand()
Definition at line 415 of file ParserOptions.php.
ParserOptions::getMaxTemplateDepth | ( | ) |
Maximum recursion depth for templates within templates.
Definition at line 441 of file ParserOptions.php.
ParserOptions::getOption | ( | $name | ) |
Fetch an option and track that is was accessed.
string | $name | Option name |
Definition at line 158 of file ParserOptions.php.
ParserOptions::getPreSaveTransform | ( | ) |
Transform wiki markup when saving the page?
Definition at line 660 of file ParserOptions.php.
Referenced by Parser\preSaveTransform().
ParserOptions::getRedirectTarget | ( | ) |
Get the previously-set redirect target.
Definition at line 1033 of file ParserOptions.php.
ParserOptions::getRemoveComments | ( | ) |
Remove HTML comments.
Definition at line 479 of file ParserOptions.php.
ParserOptions::getRenderReason | ( | ) |
Returns reason for rendering the content.
This human-readable, intended for logging and debugging only. Expected values include "edit", "view", "purge", "LinksUpdate", etc.
Definition at line 1545 of file ParserOptions.php.
ParserOptions::getSpeculativePageId | ( | ) |
A guess for {{PAGEID}}, calculated using the callback provided via setSpeculativeRevPageCallback().
For consistency, the value will be calculated upon the first call of this method, and re-used for subsequent calls.
If no callback was defined via setSpeculativePageIdCallback(), this method will return false.
Definition at line 941 of file ParserOptions.php.
ParserOptions::getSpeculativeRevId | ( | ) |
A guess for {{REVISIONID}}, calculated using the callback provided via setSpeculativeRevIdCallback().
For consistency, the value will be calculated upon the first call of this method, and re-used for subsequent calls.
If no callback was defined via setSpeculativeRevIdCallback(), this method will return false.
Definition at line 927 of file ParserOptions.php.
ParserOptions::getSuppressTOC | ( | ) |
Should the table of contents be suppressed? Used when parsing "code" pages (like JavaScript) as wikitext for backlink support and categories, but where we don't want other metadata generated (like the table of contents).
Definition at line 807 of file ParserOptions.php.
ParserOptions::getTargetLanguage | ( | ) |
Target language for the parse.
Definition at line 381 of file ParserOptions.php.
ParserOptions::getTemplateCallback | ( | ) |
Callback for template fetching; first argument to call_user_func().
Definition at line 904 of file ParserOptions.php.
ParserOptions::getThumbSize | ( | ) |
ParserOptions::getTimestamp | ( | ) |
Timestamp used for {{CURRENTDAY}} etc.
Definition at line 999 of file ParserOptions.php.
References wfTimestampNow().
ParserOptions::getUseParsoid | ( | ) |
Parsoid-format HTML output, or legacy wikitext parser HTML?
Definition at line 680 of file ParserOptions.php.
ParserOptions::getUserIdentity | ( | ) |
Get the identity of the user for whom the parse is made.
Definition at line 1052 of file ParserOptions.php.
ParserOptions::getUserLang | ( | ) |
Same as getUserLangObj() but returns a string instead.
Definition at line 754 of file ParserOptions.php.
ParserOptions::getUserLangObj | ( | ) |
Get the user language used by the parser for this page and split the parser cache.
Definition at line 738 of file ParserOptions.php.
Referenced by MediaWiki\Parser\Parsoid\ParsoidParser\parseFakeRevision().
ParserOptions::getWrapOutputClass | ( | ) |
Class to use to wrap output from Parser::parse()
Definition at line 858 of file ParserOptions.php.
ParserOptions::isSafeToCache | ( | array | $usedOptions = null | ) |
Test whether these options are safe to cache.
string[] | null | $usedOptions | the list of options actually used in the parse. Defaults to all options. |
Definition at line 1475 of file ParserOptions.php.
Referenced by MediaWiki\Parser\RevisionOutputCache\save().
ParserOptions::matches | ( | ParserOptions | $other | ) |
Check if these options match that of another options set.
This ignores report limit settings that only affect HTML comments
ParserOptions | $other |
Definition at line 1282 of file ParserOptions.php.
ParserOptions::matchesForCacheKey | ( | ParserOptions | $other | ) |
ParserOptions | $other |
Definition at line 1327 of file ParserOptions.php.
|
static |
Creates a "canonical" ParserOptions object.
For historical reasons, certain options have default values that are different from the canonical values used for caching.
IContextSource | string | UserIdentity | $context |
|
Language | StubObject | null | $userLang | (see above) |
Definition at line 1131 of file ParserOptions.php.
|
static |
Get a ParserOptions object for an anonymous user.
Definition at line 1074 of file ParserOptions.php.
|
static |
Get a ParserOptions object from a IContextSource object.
IContextSource | $context |
Definition at line 1107 of file ParserOptions.php.
References IContextSource\getLanguage(), and IContextSource\getUser().
|
static |
Get a ParserOptions object from a given user.
Language will be taken from $wgLang.
UserIdentity | $user |
Definition at line 1086 of file ParserOptions.php.
|
static |
Get a ParserOptions object from a given user and language.
UserIdentity | $user | |
Language | $lang |
Definition at line 1097 of file ParserOptions.php.
ParserOptions::optionsHash | ( | $forOptions, | |
$title = null ) |
Generate a hash string with the values set on these ParserOptions for the keys given in the array.
This will be used as part of the hash key for the parser cache, so users sharing the options with vary for the same page share the same cached data safely.
string[] | $forOptions | |
Title | null | $title | Used to get the content language of the page (since r97636) |
Definition at line 1410 of file ParserOptions.php.
Referenced by MediaWiki\Parser\ParserObserver\notifyParse().
ParserOptions::registerWatcher | ( | $callback | ) |
Registers a callback for tracking which ParserOptions which are used.
callable | null | $callback |
Definition at line 1349 of file ParserOptions.php.
ParserOptions::setAllowExternalImages | ( | $x | ) |
Allow all external images inline?
bool | null | $x | New value (null is no change) |
Definition at line 292 of file ParserOptions.php.
References wfDeprecated().
ParserOptions::setAllowExternalImagesFrom | ( | $x | ) |
External images to allow.
When self::getAllowExternalImages() is false
string | string[] | null | $x | New value (null is no change) |
Definition at line 318 of file ParserOptions.php.
References wfDeprecated().
ParserOptions::setAllowSpecialInclusion | ( | $x | ) |
Allow inclusion of special pages?
bool | null | $x | New value (null is no change) |
Definition at line 356 of file ParserOptions.php.
ParserOptions::setAllowUnsafeRawHtml | ( | $x | ) |
If the wiki is configured to allow raw html ($wgRawHtml = true) is it allowed in the specific case of parsing this page.
bool | null | $x | Value to set or null to get current value |
Definition at line 849 of file ParserOptions.php.
ParserOptions::setCleanSignatures | ( | $x | ) |
Clean up signature texts?
bool | null | $x | New value (null is no change) |
Definition at line 531 of file ParserOptions.php.
ParserOptions::setCurrentRevisionRecordCallback | ( | $x | ) |
Callback for current revision fetching; first argument to call_user_func().
callable | null | $x | New value |
Definition at line 896 of file ParserOptions.php.
ParserOptions::setDateFormat | ( | $x | ) |
Date format index.
string | null | $x | New value (null is no change) |
Definition at line 717 of file ParserOptions.php.
ParserOptions::setEnableImageWhitelist | ( | $x | ) |
Use the on-wiki external image whitelist?
bool | null | $x | New value (null is no change) |
Definition at line 338 of file ParserOptions.php.
References wfDeprecated().
ParserOptions::setExpensiveParserFunctionLimit | ( | $x | ) |
Maximum number of calls per parse to expensive parser functions.
int | null | $x | New value (null is no change) |
Definition at line 470 of file ParserOptions.php.
ParserOptions::setExternalLinkTarget | ( | $x | ) |
Target attribute for external links.
string | false | null | $x | New value (null is no change) |
Definition at line 550 of file ParserOptions.php.
ParserOptions::setInterfaceMessage | ( | $x | ) |
Parsing an interface message?
bool | null | $x | New value (null is no change) |
Definition at line 373 of file ParserOptions.php.
ParserOptions::setInterwikiMagic | ( | $x | ) |
Specify whether to extract interlanguage links.
bool | null | $x | New value (null is no change) |
Definition at line 273 of file ParserOptions.php.
ParserOptions::setIsPreview | ( | $x | ) |
Parsing the page for a "preview" operation?
bool | null | $x | New value (null is no change) |
Definition at line 618 of file ParserOptions.php.
ParserOptions::setIsPrintable | ( | $x | ) |
Parsing the printable version of the page?
bool | null | $x | New value (null is no change) |
Definition at line 652 of file ParserOptions.php.
ParserOptions::setIsSectionPreview | ( | $x | ) |
Parsing the page for a "preview" operation on a single section?
bool | null | $x | New value (null is no change) |
Definition at line 635 of file ParserOptions.php.
ParserOptions::setMaxIncludeSize | ( | $x | ) |
Maximum size of template expansions, in bytes.
int | null | $x | New value (null is no change) |
Definition at line 407 of file ParserOptions.php.
ParserOptions::setMaxPPNodeCount | ( | $x | ) |
Maximum number of nodes touched by PPFrame::expand()
int | null | $x | New value (null is no change) |
Definition at line 424 of file ParserOptions.php.
ParserOptions::setMaxTemplateDepth | ( | $x | ) |
Maximum recursion depth for templates within templates.
int | null | $x | New value (null is no change) |
Definition at line 451 of file ParserOptions.php.
ParserOptions::setOption | ( | $name, | |
$value ) |
Set an option, generically.
string | $name | Option name |
mixed | $value | New value. Passing null will set null, unlike many of the existing accessors which ignore null for historical reasons. |
Definition at line 232 of file ParserOptions.php.
|
protected |
Legacy implementation.
string | $name | Option name |
mixed | $value | New value. Passing null does not set the value. |
Definition at line 249 of file ParserOptions.php.
References wfSetVar().
ParserOptions::setPreSaveTransform | ( | $x | ) |
Transform wiki markup when saving the page?
bool | null | $x | New value (null is no change) |
Definition at line 669 of file ParserOptions.php.
ParserOptions::setRedirectTarget | ( | $title | ) |
Note that setting or changing this does not make the page a redirect or change its target, it merely records the information for reference during the parse.
Title | null | $title |
Definition at line 1023 of file ParserOptions.php.
ParserOptions::setRemoveComments | ( | $x | ) |
Remove HTML comments.
bool | null | $x | New value (null is no change) |
Definition at line 489 of file ParserOptions.php.
ParserOptions::setRenderReason | ( | string | $renderReason | ) |
Sets reason for rendering the content.
This human-readable, intended for logging and debugging only. Expected values include "edit", "view", "purge", "LinksUpdate", etc.
string | $renderReason |
Definition at line 1554 of file ParserOptions.php.
Referenced by Article\getParserOptions(), and Article\getParserOutput().
ParserOptions::setSpeculativePageIdCallback | ( | $x | ) |
Callback to generate a guess for {{PAGEID}}.
callable | null | $x | New value |
Definition at line 990 of file ParserOptions.php.
ParserOptions::setSpeculativeRevIdCallback | ( | $x | ) |
Callback to generate a guess for {{REVISIONID}}.
callable | null | $x | New value |
Definition at line 979 of file ParserOptions.php.
ParserOptions::setSuppressTOC | ( | ) |
Suppress generation of the table of contents.
Used when parsing "code" pages (like JavaScript) as wikitext for backlink support and categories, but where we don't want other metadata generated (like the table of contents).
Definition at line 819 of file ParserOptions.php.
ParserOptions::setTargetLanguage | ( | $x | ) |
Target language for the parse.
Language | null | $x | New value |
Definition at line 390 of file ParserOptions.php.
ParserOptions::setTemplateCallback | ( | $x | ) |
Callback for template fetching; first argument to call_user_func().
callable | null | $x | New value (null is no change) |
Definition at line 913 of file ParserOptions.php.
ParserOptions::setThumbSize | ( | $x | ) |
Thumb size preferred by the user.
int | null | $x | New value (null is no change) |
Definition at line 601 of file ParserOptions.php.
ParserOptions::setTimestamp | ( | $x | ) |
Timestamp used for {{CURRENTDAY}} etc.
string | null | $x | New value (null is no change) |
Definition at line 1011 of file ParserOptions.php.
References wfSetVar().
ParserOptions::setupFakeRevision | ( | $title, | |
$content, | |||
$user ) |
Sets a hook to force that a page exists, and sets a current revision callback to return a revision with custom content when the current revision of the page is requested.
Title | $title | |
Content | $content | |
UserIdentity | $user | The user that the fake revision is attributed to |
Definition at line 1501 of file ParserOptions.php.
References $content.
ParserOptions::setUseParsoid | ( | ) |
Request Parsoid-format HTML output.
Definition at line 690 of file ParserOptions.php.
Referenced by MediaWiki\Parser\Parsoid\ParsoidOutputAccess\getCachedParserOutput().
ParserOptions::setUserLang | ( | $x | ) |
Set the user language used by the parser for this page and split the parser cache.
string | Language | $x | New value |
Definition at line 763 of file ParserOptions.php.
ParserOptions::setWrapOutputClass | ( | $className | ) |
CSS class to use to wrap output from Parser::parse()
string | $className | Class name to use for wrapping. Passing false to indicate "no wrapping" was deprecated in MediaWiki 1.31. |
Definition at line 869 of file ParserOptions.php.
References wfDeprecated().