Inherited by Parser_LinkHooks.
Public Member Functions | |
__construct ($conf=array()) | |
#@- | |
__destruct () | |
Reduce memory usage to reduce the impact of circular references. | |
firstCallInit () | |
Do various kinds of initialisation on the first call of the parser. | |
clearState () | |
Clear Parser state. | |
setOutputType ($ot) | |
setTitle ($t) | |
Set the context title. | |
uniqPrefix () | |
Accessor for mUniqPrefix. | |
parse ($text, Title $title, ParserOptions $options, $linestart=true, $clearState=true, $revid=null) | |
Convert wikitext to HTML Do not call this function recursively. | |
recursiveTagParse ($text, $frame=false) | |
Recursive parser entry point that can be called from an extension tag hook. | |
preprocess ($text, $title, $options, $revid=null) | |
Expand templates and variables in the text, producing valid, static wikitext. | |
& | getTitle () |
getOptions () | |
getRevisionId () | |
getOutput () | |
nextLinkID () | |
getFunctionLang () | |
getPreprocessor () | |
Get a preprocessor object. | |
getStripList () | |
Get a list of strippable XML-like elements. | |
strip ($text, $state, $stripcomments=false, $dontstrip=array()) | |
unstripForHTML ($text) | |
internalParse ($text, $isMain=true, $frame=false) | |
Helper function for parse() that transforms wiki markup into HTML. | |
doMagicLinks ($text) | |
Replace special strings like "ISBN xxx" and "RFC xxx" with magic external links. | |
magicLinkCallback ($m) | |
makeFreeExternalLink ($url) | |
Make a free external link, given a user-supplied URL. | |
doHeadings ($text) | |
Parse headers and return html. | |
doAllQuotes ($text) | |
Replace single quotes with HTML markup. | |
doQuotes ($text) | |
Helper function for doAllQuotes(). | |
getExternalLinkAttribs ($url=false) | |
Get an associative array of additional HTML attributes appropriate for a particular external link. | |
maybeMakeExternalImage ($url) | |
make an image if it's allowed, either through the global option, through the exception, or through the on-wiki whitelist | |
replaceInternalLinks ($s) | |
Process [[ ]] wikilinks. | |
replaceInternalLinks2 (&$s) | |
Process [[ ]] wikilinks (RIL). | |
makeLinkHolder (&$nt, $text= '', $query= '', $trail= '', $prefix= '') | |
Make a link placeholder. | |
makeKnownLinkHolder ($nt, $text= '', $query= '', $trail= '', $prefix= '') | |
Render a forced-blue link inline; protect against double expansion of URLs if we're in a mode that prepends full URL prefixes to internal links. | |
armorLinks ($text) | |
Insert a NOPARSE hacky thing into any inline links in a chunk that's going to go through further parsing steps before inline URL expansion. | |
areSubpagesAllowed () | |
Return true if subpage links should be expanded on this page. | |
getCommon ($st1, $st2) | |
openList ($char) | |
nextItem ($char) | |
closeList ($char) | |
findColonNoLinks ($str, &$before, &$after) | |
Split up a string on ':', ignoring any occurences inside tags to prevent illegal overlapping. | |
getVariableValue ($index, $frame=false) | |
Return value of a magic variable (like PAGENAME). | |
initialiseVariables () | |
initialise the magic variables (like CURRENTMONTHNAME) and substitution modifiers | |
preprocessToDom ($text, $flags=0) | |
Preprocess some wikitext and return the document tree. | |
replaceVariables ($text, $frame=false, $argsOnly=false) | |
Replace magic variables, templates, and template arguments with the appropriate text. | |
limitationWarn ($limitationType, $current=null, $max=null) | |
Warn the user when a parser limitation is reached Will warn at most once the user per limitation type. | |
braceSubstitution ($piece, $frame) | |
Return the text of a template, after recursively replacing any variables or templates within the template. | |
getTemplateDom ($title) | |
Get the semi-parsed DOM representation of a template with a given title, and its redirect destination title. | |
fetchTemplateAndTitle ($title) | |
Fetch the unparsed text of a template and register a reference to it. | |
fetchTemplate ($title) | |
interwikiTransclude ($title, $action) | |
Transclude an interwiki link. | |
fetchScaryTemplateMaybeFromCache ($url) | |
argSubstitution ($piece, $frame) | |
Triple brace replacement -- used for template arguments. | |
extensionSubstitution ($params, $frame) | |
Return the text to be used for a given extension tag. | |
incrementIncludeSize ($type, $size) | |
Increment an include size counter. | |
incrementExpensiveFunctionCount () | |
Increment the expensive function count. | |
doDoubleUnderscore ($text) | |
Strip double-underscore items like __NOGALLERY__ and __NOTOC__ Fills $this->mDoubleUnderscores, returns the modified text. | |
formatHeadings ($text, $origText, $isMain=true) | |
This function accomplishes several tasks: 1) Auto-number headings if that option is enabled 2) Add an [edit] link to sections for users who have enabled the option and can edit the page 3) Add a Table of contents on the top for users who have enabled the option 4) Auto-anchor headings. | |
preSaveTransform ($text, Title $title, $user, $options, $clearState=true) | |
Transform wiki markup when saving a page by doing -> conversion, substitting signatures, {{subst:}} templates, etc. | |
pstPass2 ($text, $user) | |
Pre-save transform helper function. | |
getUserSig (&$user, $nickname=false, $fancySig=null) | |
Fetch the user's signature text, if any, and normalize to validated, ready-to-insert wikitext. | |
validateSig ($text) | |
Check that the user's signature contains no bad XML. | |
cleanSig ($text, $parsing=false) | |
Clean up signature text. | |
cleanSigInSig ($text) | |
Strip ~~~, ~~~~ and ~~~~~ out of signatures. | |
startExternalParse (&$title, $options, $outputType, $clearState=true) | |
Set up some variables which are usually set up in parse() so that an external function can call some class members with confidence. | |
transformMsg ($text, $options) | |
Wrapper for preprocess(). | |
setHook ($tag, $callback) | |
Create an HTML-style tag, e.g. | |
setTransparentTagHook ($tag, $callback) | |
clearTagHooks () | |
Remove all tag hooks. | |
setFunctionHook ($id, $callback, $flags=0) | |
Create a function, e.g. | |
getFunctionHooks () | |
Get all registered function hook identifiers. | |
setFunctionTagHook ($tag, $callback, $flags) | |
Create a tag function, e.g. | |
replaceLinkHolders (&$text, $options=0) | |
FIXME: update documentation. | |
replaceLinkHoldersText ($text) | |
Replace link placeholders with plain text of links (not HTML-formatted). | |
renderImageGallery ($text, $params) | |
Renders an image gallery from a text with one line per image. | |
getImageParams ($handler) | |
makeImage ($title, $options, $holders=false) | |
Parse image options text and use it to make an image. | |
disableCache () | |
Set a flag in the output object indicating that the content is dynamic and shouldn't be cached. | |
attributeStripCallback (&$text, $frame=false) | |
#@+ Callback from the Sanitizer for expanding items found in HTML attribute values, so they can be safely tested and escaped. | |
Title ($x=null) | |
#@- | |
Options ($x=null) | |
OutputType ($x=null) | |
getTags () | |
#@- | |
getSection ($text, $section, $deftext='') | |
This function returns the text of a section, specified by a number ($section). | |
replaceSection ($oldtext, $section, $text) | |
getRevisionTimestamp () | |
Get the timestamp associated with the current revision, adjusted for the default server-local timestamp. | |
getRevisionUser () | |
Get the name of the user that edited the last revision. | |
setDefaultSort ($sort) | |
Mutator for $mDefaultSort. | |
getDefaultSort () | |
Accessor for $mDefaultSort Will use the title/prefixed title if none is set. | |
getCustomDefaultSort () | |
Accessor for $mDefaultSort Unlike getDefaultSort(), will return false if none is set. | |
guessSectionNameFromWikiText ($text) | |
Try to guess the section anchor name based on a wikitext fragment presumably extracted from a heading, for example "Header" from "== Header ==". | |
stripSectionName ($text) | |
Strips a text string of wikitext for use in a section anchor. | |
srvus ($text) | |
testSrvus ($text, $title, $options, $outputType=self::OT_HTML) | |
strip/replaceVariables/unstrip for preprocessor regression testing | |
testPst ($text, $title, $options) | |
testPreprocess ($text, $title, $options) | |
markerSkipCallback ($s, $callback) | |
serialiseHalfParsedText ($text) | |
unserialiseHalfParsedText ($data, $intPrefix=null) | |
Static Public Member Functions | |
extractTagsAndParams ($elements, $text, &$matches, $uniq_prefix= '') | |
Replaces all occurrences of HTML-style comments and the given tags in the text with a random marker and returns the next text. | |
static | tidy ($text) |
Interface with html tidy. | |
static | replaceUnusualEscapes ($url) |
Replace unusual URL escape codes with their equivalent characters. | |
static | splitWhitespace ($s) |
static | createAssocArgs ($args) |
Clean up argument array - refactored in 1.9 so parserfunctions can use it, too. | |
static | statelessFetchTemplate ($title, $parser=false) |
Static function to get a template Can be overridden via ParserOptions::setTemplateCallback(). | |
static | mergeSectionTrees ($tree1, $tree2, $section, $title, $len2) |
Merge $tree2 into $tree1 by replacing the section with index $section in $tree1 and its descendants with the sections in $tree2. | |
Public Attributes | |
const | VERSION = '1.6.4' |
Update this version number when the ParserOutput format changes in an incompatible way, so the parser cache can automatically discard old data. | |
const | SFH_NO_HASH = 1 |
const | SFH_OBJECT_ARGS = 2 |
const | EXT_LINK_URL_CLASS = '[^][<>"\\x00-\\x20\\x7F]' |
const | EXT_IMAGE_REGEX |
const | COLON_STATE_TEXT = 0 |
const | COLON_STATE_TAG = 1 |
const | COLON_STATE_TAGSTART = 2 |
const | COLON_STATE_CLOSETAG = 3 |
const | COLON_STATE_TAGSLASH = 4 |
const | COLON_STATE_COMMENT = 5 |
const | COLON_STATE_COMMENTDASH = 6 |
const | COLON_STATE_COMMENTDASHDASH = 7 |
const | PTD_FOR_INCLUSION = 1 |
const | OT_HTML = 1 |
const | OT_WIKI = 2 |
const | OT_PREPROCESS = 3 |
const | OT_MSG = 3 |
const | MARKER_SUFFIX = "-QINU\x7f" |
$mTagHooks | |
#@+ | |
$mTransparentTagHooks | |
$mFunctionHooks | |
$mFunctionSynonyms | |
$mVariables | |
$mSubstWords | |
$mImageParams | |
$mImageParamsMagicArray | |
$mStripList | |
$mMarkerIndex | |
$mPreprocessor | |
$mExtLinkBracketedRegex | |
$mUrlProtocols | |
$mDefaultStripList | |
$mVarCache | |
$mConf | |
$mFunctionTagHooks | |
$mOutput | |
$mAutonumber | |
$mDTopen | |
$mStripState | |
$mIncludeCount | |
$mArgStack | |
$mLastSection | |
$mInPre | |
$mLinkHolders | |
$mLinkID | |
$mIncludeSizes | |
$mPPNodeCount | |
$mDefaultSort | |
$mTplExpandCache | |
$mTplRedirCache | |
$mTplDomCache | |
$mHeadings | |
$mDoubleUnderscores | |
$mExpensiveFunctionCount | |
$mOptions | |
$mTitle | |
$mOutputType | |
$ot | |
$mRevisionId | |
$mRevisionTimestamp | |
$mRevIdForTs | |
Protected Member Functions | |
addTrackingCategory ($msg) | |
Add a tracking category, getting the title from a system message, or print a debug message if the title is invalid. | |
stripAltText ($caption, $holders) | |
Private Member Functions | |
unstrip ($text, $state) | |
Restores pre, math, and other extensions removed by strip(). | |
unstripNoWiki ($text, $state) | |
Always call this after unstrip() to preserve the order. | |
insertStripItem ($text) | |
Add an item to the strip state Returns the unique tag which must be inserted into the stripped text The tag will be replaced with the original text in unstrip(). | |
doTableStuff ($text) | |
parse the wiki syntax used to render tables | |
replaceExternalLinks ($text) | |
Replace external links (REL). | |
maybeDoSubpageLink ($target, &$text) | |
Handle link to subpage if necessary. | |
closeParagraph () | |
#@+ Used by doBlockLevels() | |
doBlockLevels ($text, $linestart) | |
#@- | |
extractSections ($text, $section, $mode, $newText='') | |
#@- | |
Static Private Member Functions | |
getRandomString () | |
Get a random string. | |
static | replaceUnusualEscapesCallback ($matches) |
Callback function used in replaceUnusualEscapes(). | |
static | incrementNumbering (&$number, $level, $lastLevel) |
Increment a section number. |
There are five main entry points into the Parser class: parse() produces HTML output preSaveTransform(). produces altered wiki markup. preprocess() removes HTML comments and expands templates cleanSig() Cleans a signature before saving it to preferences extractSections() Extracts sections from an article for section editing
Globals used: objects: $wgLang, $wgContLang
NOT $wgArticle, $wgUser or $wgTitle. Keep them away!
settings: $wgUseTex*, $wgUseDynamicDates*, $wgInterwikiMagic*, $wgNamespacesWithSubpages, $wgAllowExternalImages*, $wgLocaltimezone, $wgAllowSpecialInclusion*, $wgMaxArticleSize*
* only within ParserOptions
Definition at line 46 of file Parser.php.
Parser::__construct | ( | $ | conf = array() |
) |
#@-
Constructor
Reimplemented in Parser_LinkHooks.
Definition at line 125 of file Parser.php.
References $conf, wfDebug(), and wfUrlProtocols().
Parser::__destruct | ( | ) |
Reduce memory usage to reduce the impact of circular references.
Definition at line 155 of file Parser.php.
References $name.
Parser::addTrackingCategory | ( | $ | msg | ) | [protected] |
Add a tracking category, getting the title from a system message, or print a debug message if the title is invalid.
$msg | String message key |
Definition at line 3470 of file Parser.php.
References $msg, Title::makeTitleSafe(), wfDebug(), and wfMsgForContent().
Parser::areSubpagesAllowed | ( | ) |
Return true if subpage links should be expanded on this page.
Definition at line 1890 of file Parser.php.
References MWNamespace::hasSubpages().
Referenced by replaceInternalLinks2(), and Parser_LinkHooks::replaceInternalLinksCallback().
Parser::argSubstitution | ( | $ | piece, | |
$ | frame | |||
) |
Triple brace replacement -- used for template arguments.
Definition at line 3252 of file Parser.php.
References wfProfileIn(), and wfProfileOut().
Parser::armorLinks | ( | $ | text | ) |
Insert a NOPARSE hacky thing into any inline links in a chunk that's going to go through further parsing steps before inline URL expansion.
Not needed quite as much as it used to be since free links are a bit more sensible these days. But bracketed links are still an issue.
string | more-or-less HTML |
Definition at line 1881 of file Parser.php.
References wfUrlProtocols().
Referenced by replaceInternalLinks2().
Parser::attributeStripCallback | ( | &$ | text, | |
$ | frame = false | |||
) |
#@+ Callback from the Sanitizer for expanding items found in HTML attribute values, so they can be safely tested and escaped.
string | $text | |
PPFrame | $frame |
Definition at line 4719 of file Parser.php.
Parser::braceSubstitution | ( | $ | piece, | |
$ | frame | |||
) |
Return the text of a template, after recursively replacing any variables or templates within the template.
array | $piece The parts of the template $piece['title']: the title, i.e. the part before the | $piece['parts']: the parameter array $piece['lineStart']: whether the brace was at the start of a line | |
PPFrame | The current frame, contains template arguments |
Definition at line 2787 of file Parser.php.
References $i, $result, $wgNonincludableNamespaces, SpecialPage::capturePath(), expand, MagicWord::get(), MagicWord::getCacheTTL(), Title::newFromText(), PPFrame::RECOVER_ORIG, wfDebug(), wfEscapeWikiText(), wfMsgForContent(), wfProfileIn(), and wfProfileOut().
Parser::cleanSig | ( | $ | text, | |
$ | parsing = false | |||
) |
Clean up signature text.
1) Strip ~~~, ~~~~ and ~~~~~ out of signatures
string | $text | |
$parsing | Whether we're cleaning (preferences save) or parsing |
Definition at line 4113 of file Parser.php.
References $wgTitle, and MagicWord::get().
Parser::cleanSigInSig | ( | $ | text | ) |
Strip ~~~, ~~~~ and ~~~~~ out of signatures.
string | $text |
Definition at line 4151 of file Parser.php.
Parser::clearState | ( | ) |
Clear Parser state.
Definition at line 188 of file Parser.php.
References firstCallInit(), getRandomString(), wfProfileIn(), wfProfileOut(), and wfRunHooks().
Referenced by parse().
Parser::clearTagHooks | ( | ) |
Parser::closeList | ( | $ | char | ) |
Definition at line 1966 of file Parser.php.
Parser::closeParagraph | ( | ) | [private] |
static Parser::createAssocArgs | ( | $ | args | ) | [static] |
Clean up argument array - refactored in 1.9 so parserfunctions can use it, too.
Definition at line 2735 of file Parser.php.
References $name.
Parser::disableCache | ( | ) |
Set a flag in the output object indicating that the content is dynamic and shouldn't be cached.
Definition at line 4706 of file Parser.php.
References wfDebug().
Parser::doAllQuotes | ( | $ | text | ) |
Replace single quotes with HTML markup.
Definition at line 1114 of file Parser.php.
References doQuotes(), StringUtils::explode(), wfProfileIn(), and wfProfileOut().
Referenced by internalParse().
Parser::doBlockLevels | ( | $ | text, | |
$ | linestart | |||
) | [private] |
#@-
Make lists from lines starting with ':', '*', '#', etc. (DBL)
$linestart | bool whether or not this is at the start of a line. |
Definition at line 1989 of file Parser.php.
References $output, $t, StringUtils::explode(), wfProfileIn(), and wfProfileOut().
Referenced by parse().
Parser::doDoubleUnderscore | ( | $ | text | ) |
Strip double-underscore items like __NOGALLERY__ and __NOTOC__ Fills $this->mDoubleUnderscores, returns the modified text.
Definition at line 3417 of file Parser.php.
References MagicWord::get(), MagicWord::getDoubleUnderscoreArray(), wfProfileIn(), and wfProfileOut().
Referenced by internalParse().
Parser::doHeadings | ( | $ | text | ) |
Parse headers and return html.
Definition at line 1098 of file Parser.php.
References $i, wfProfileIn(), and wfProfileOut().
Referenced by internalParse().
Parser::doMagicLinks | ( | $ | text | ) |
Replace special strings like "ISBN xxx" and "RFC xxx" with magic external links.
DML
Definition at line 973 of file Parser.php.
References wfProfileIn(), and wfProfileOut().
Referenced by internalParse().
Parser::doQuotes | ( | $ | text | ) |
Helper function for doAllQuotes().
Definition at line 1129 of file Parser.php.
Referenced by doAllQuotes().
Parser::doTableStuff | ( | $ | text | ) | [private] |
parse the wiki syntax used to render tables
Definition at line 707 of file Parser.php.
References $out.
Referenced by internalParse().
Parser::extensionSubstitution | ( | $ | params, | |
$ | frame | |||
) |
Return the text to be used for a given extension tag.
This is the ghost of strip().
array | $params Associative array of parameters: name PPNode for the tag name attr PPNode for unparsed text where tag attributes are thought to be attributes Optional associative array of parsed attributes inner Contents of extension element noClose Original text did not have a close tag | |
PPFrame | $frame |
Definition at line 3305 of file Parser.php.
References $name, $output, $wgRawHtml, and Sanitizer::decodeTagAttributes().
Parser::extractSections | ( | $ | text, | |
$ | section, | |||
$ | mode, | |||
$ | newText = '' | |||
) | [private] |
#@-
Break wikitext input into sections, and either pull or replace some particular section's text.
External callers should use the getSection and replaceSection methods.
string | $text Page wikitext | |
string | $section A section identifier string of the form: <flag1> - <flag2> - ... - <section number>=""> |
The section number 0 pulls the text before the first heading; other numbers will pull the given section along with its lower-level subsections. If the section is not found, $mode=get will return $newtext, and $mode=replace will return $text.
string | $mode One of "get" or "replace" | |
string | $newText Replacement text for section data. |
Definition at line 4767 of file Parser.php.
References $mode, $section, $wgTitle, and PPFrame::RECOVER_ORIG.
Parser::extractTagsAndParams | ( | $ | elements, | |
$ | text, | |||
&$ | matches, | |||
$ | uniq_prefix = '' | |||
) | [static] |
Replaces all occurrences of HTML-style comments and the given tags in the text with a random marker and returns the next text.
The output parameter $matches will be an associative array filled with data in the form: 'UNIQ-xxxxx' => array( 'element', 'tag content', array( 'param' => 'x' ), '<element param="x">tag content</element>' ) )
$elements | list of element names. Comments are always extracted. | |
$text | Source text string. | |
$uniq_prefix |
Definition at line 575 of file Parser.php.
Referenced by parse().
Parser::fetchScaryTemplateMaybeFromCache | ( | $ | url | ) |
Definition at line 3225 of file Parser.php.
References $dbr, $dbw, $url, $wgTranscludeCacheExpiry, Http::get(), wfGetDB(), and wfMsg().
Parser::fetchTemplate | ( | $ | title | ) |
Definition at line 3142 of file Parser.php.
Parser::fetchTemplateAndTitle | ( | $ | title | ) |
Fetch the unparsed text of a template and register a reference to it.
Definition at line 3129 of file Parser.php.
Parser::findColonNoLinks | ( | $ | str, | |
&$ | before, | |||
&$ | after | |||
) |
Split up a string on ':', ignoring any occurences inside tags to prevent illegal overlapping.
string | $str the string to split | |
string | &$before set to everything before the ':' | |
string | &$after set to everything after the ':' return string the position of the ':', or false if none found |
Definition at line 2179 of file Parser.php.
References $i, wfDebug(), wfProfileIn(), and wfProfileOut().
Parser::firstCallInit | ( | ) |
Do various kinds of initialisation on the first call of the parser.
Reimplemented in Parser_LinkHooks.
Definition at line 167 of file Parser.php.
References initialiseVariables(), CoreTagHooks::register(), CoreParserFunctions::register(), wfProfileIn(), wfProfileOut(), and wfRunHooks().
Referenced by clearState().
Parser::formatHeadings | ( | $ | text, | |
$ | origText, | |||
$ | isMain = true | |||
) |
This function accomplishes several tasks: 1) Auto-number headings if that option is enabled 2) Add an [edit] link to sections for users who have enabled the option and can edit the page 3) Add a Table of contents on the top for users who have enabled the option 4) Auto-anchor headings.
It loops through all headlines, collects the necessary data, then splits up the string and re-inserts the newly formatted headlines.
string | $text | |
string | $origText Original, untouched wikitext | |
boolean | $isMain |
Definition at line 3501 of file Parser.php.
References $i, $wgExperimentalHtmlIds, $wgHtml5, $wgMaxTocLevel, Sanitizer::escapeId(), Title::newFromText(), and PPFrame::RECOVER_ORIG.
Referenced by internalParse().
Parser::getCommon | ( | $ | st1, | |
$ | st2 | |||
) |
Parser::getCustomDefaultSort | ( | ) |
Accessor for $mDefaultSort Unlike getDefaultSort(), will return false if none is set.
Definition at line 4960 of file Parser.php.
Parser::getDefaultSort | ( | ) |
Accessor for $mDefaultSort Will use the title/prefixed title if none is set.
Definition at line 4942 of file Parser.php.
References $wgCategoryPrefixedDefaultSortkey.
Referenced by replaceInternalLinks2().
Parser::getExternalLinkAttribs | ( | $ | url = false |
) |
Get an associative array of additional HTML attributes appropriate for a particular external link.
This currently may include rel => nofollow (depending on configuration, namespace, and the URL's domain) and/or a target attribute (depending on configuration).
string | $url Optional URL, to extract the domain from for rel => nofollow if appropriate |
Definition at line 1386 of file Parser.php.
References $url, $wgNoFollowDomainExceptions, $wgNoFollowLinks, $wgNoFollowNsExceptions, and wfParseUrl().
Referenced by makeFreeExternalLink(), and replaceExternalLinks().
Parser::getFunctionHooks | ( | ) |
Get all registered function hook identifiers.
Definition at line 4319 of file Parser.php.
Parser::getFunctionLang | ( | ) |
Parser::getImageParams | ( | $ | handler | ) |
Parser::getOptions | ( | ) |
Definition at line 530 of file Parser.php.
Parser::getOutput | ( | ) |
Definition at line 532 of file Parser.php.
Parser::getPreprocessor | ( | ) |
Parser::getRandomString | ( | ) | [static, private] |
Get a random string.
Definition at line 525 of file Parser.php.
Referenced by Parser_DiffTest::__construct(), and clearState().
Parser::getRevisionId | ( | ) |
Definition at line 531 of file Parser.php.
Parser::getRevisionTimestamp | ( | ) |
Get the timestamp associated with the current revision, adjusted for the default server-local timestamp.
Definition at line 4884 of file Parser.php.
References $dbr, wfGetDB(), wfProfileIn(), wfProfileOut(), and wfTimestamp().
Parser::getRevisionUser | ( | ) |
Get the name of the user that edited the last revision.
Definition at line 4914 of file Parser.php.
References $wgUser, and Revision::newFromId().
Parser::getSection | ( | $ | text, | |
$ | section, | |||
$ | deftext = '' | |||
) |
This function returns the text of a section, specified by a number ($section).
A section is text under a heading like == Heading == or <h1>Heading</h1>, or the first section before any such heading (section 0).
If a section contains subsections, these are also returned.
string | $text text to look in | |
string | $section section identifier | |
string | $deftext default to return if section is not found |
Definition at line 4872 of file Parser.php.
References $section.
Parser::getStripList | ( | ) |
Parser::getTags | ( | ) |
Parser::getTemplateDom | ( | $ | title | ) |
Get the semi-parsed DOM representation of a template with a given title, and its redirect destination title.
Cached.
Definition at line 3094 of file Parser.php.
References Title::equals(), Title::getDBkey(), Title::getNamespace(), Title::getPrefixedDBkey(), and Title::makeTitle().
& Parser::getTitle | ( | ) |
Definition at line 529 of file Parser.php.
Parser::getUserSig | ( | &$ | user, | |
$ | nickname = false , |
|||
$ | fancySig = null | |||
) |
Fetch the user's signature text, if any, and normalize to validated, ready-to-insert wikitext.
If you have pre-fetched the nickname or the fancySig option, you can specify them here to save a database query.
User | $user |
Definition at line 4051 of file Parser.php.
References $wgMaxSigChars, wfDebug(), wfEscapeWikiText(), and wfMsgExt().
Parser::getVariableValue | ( | $ | index, | |
$ | frame = false | |||
) |
Return value of a magic variable (like PAGENAME).
Definition at line 2339 of file Parser.php.
References $wgContLanguageCode, $wgLocaltimezone, $wgScriptPath, $wgServer, $wgSitename, $wgStylePath, SiteStats::activeUsers(), SiteStats::articles(), SiteStats::edits(), SpecialVersion::getVersion(), SiteStats::images(), SiteStats::numberingroup(), SiteStats::pages(), SiteStats::users(), SiteStats::views(), wfDebug(), wfEscapeWikiText(), wfRunHooks(), wfTimestamp(), and wfUrlencode().
Parser::guessSectionNameFromWikiText | ( | $ | text | ) |
Try to guess the section anchor name based on a wikitext fragment presumably extracted from a heading, for example "Header" from "== Header ==".
Definition at line 4969 of file Parser.php.
References Sanitizer::decodeCharReferences(), and StringUtils::delimiterReplace().
Parser::incrementExpensiveFunctionCount | ( | ) |
Increment the expensive function count.
Definition at line 3404 of file Parser.php.
References $wgExpensiveParserFunctionLimit.
Parser::incrementIncludeSize | ( | $ | type, | |
$ | size | |||
) |
Increment an include size counter.
string | $type The type of expansion | |
integer | $size The size of the text |
Definition at line 3390 of file Parser.php.
References $size.
static Parser::incrementNumbering | ( | &$ | number, | |
$ | level, | |||
$ | lastLevel | |||
) | [static, private] |
Increment a section number.
Helper function for mergeSectionTrees()
$number | array Array representing a section number | |
$level | int Current TOC level (depth) | |
$lastLevel | int Level of previous TOC entry |
Definition at line 3916 of file Parser.php.
Parser::initialiseVariables | ( | ) |
initialise the magic variables (like CURRENTMONTHNAME) and substitution modifiers
Definition at line 2642 of file Parser.php.
References MagicWord::getSubstIDs(), MagicWord::getVariableIDs(), wfProfileIn(), and wfProfileOut().
Referenced by Parser_LinkHooks::firstCallInit(), and firstCallInit().
Parser::insertStripItem | ( | $ | text | ) | [private] |
Add an item to the strip state Returns the unique tag which must be inserted into the stripped text The tag will be replaced with the original text in unstrip().
Definition at line 686 of file Parser.php.
Parser::internalParse | ( | $ | text, | |
$ | isMain = true , |
|||
$ | frame = false | |||
) |
Helper function for parse() that transforms wiki markup into HTML.
Only called for $mOutputType == self::OT_HTML.
Definition at line 906 of file Parser.php.
References doAllQuotes(), doDoubleUnderscore(), doHeadings(), doMagicLinks(), doTableStuff(), formatHeadings(), DateFormatter::getInstance(), preprocessToDom(), PTD_FOR_INCLUSION, Sanitizer::removeHTMLtags(), replaceExternalLinks(), replaceInternalLinks(), replaceVariables(), wfProfileIn(), wfProfileOut(), and wfRunHooks().
Referenced by parse().
Parser::interwikiTransclude | ( | $ | title, | |
$ | action | |||
) |
Transclude an interwiki link.
Definition at line 3212 of file Parser.php.
References $url, $wgEnableScaryTranscluding, and wfMsg().
Parser::limitationWarn | ( | $ | limitationType, | |
$ | current = null , |
|||
$ | max = null | |||
) |
Warn the user when a parser limitation is reached Will warn at most once the user per limitation type.
string | $limitationType, should be one of: 'expensive-parserfunction' (corresponding messages: 'expensive-parserfunction-warning', 'expensive-parserfunction-category') 'post-expand-template-argument' (corresponding messages: 'post-expand-template-argument-warning', 'post-expand-template-argument-category') 'post-expand-template-inclusion' (corresponding messages: 'post-expand-template-inclusion-warning', 'post-expand-template-inclusion-category') int $current, $max When an explicit limit has been exceeded, provide the values (optional) |
Definition at line 2768 of file Parser.php.
References wfMsgExt().
Parser::magicLinkCallback | ( | $ | m | ) |
Definition at line 993 of file Parser.php.
References $url, SpecialPage::getTitleFor(), makeFreeExternalLink(), and wfMsg().
Parser::makeFreeExternalLink | ( | $ | url | ) |
Make a free external link, given a user-supplied URL.
Definition at line 1046 of file Parser.php.
References $url, Sanitizer::cleanUrl(), getExternalLinkAttribs(), maybeMakeExternalImage(), replaceUnusualEscapes(), wfProfileIn(), and wfProfileOut().
Referenced by magicLinkCallback().
Parser::makeImage | ( | $ | title, | |
$ | options, | |||
$ | holders = false | |||
) |
Parse image options text and use it to make an image.
Title | $title | |
string | $options | |
LinkHolderArray | $holders |
Definition at line 4482 of file Parser.php.
References StringUtils::explode(), Title::getDBkey(), Title::getText(), Title::newFromText(), wfFindFile(), and wfRunHooks().
Referenced by replaceInternalLinks2().
Parser::makeKnownLinkHolder | ( | $ | nt, | |
$ | text = '' , |
|||
$ | query = '' , |
|||
$ | trail = '' , |
|||
$ | prefix = '' | |||
) |
Render a forced-blue link inline; protect against double expansion of URLs if we're in a mode that prepends full URL prefixes to internal links.
Since this little disaster has to split off the trail text to avoid breaking URLs in the following text without breaking trails on the wiki links, it's been made into a horrible function.
Title | $nt | |
string | $text | |
string | $query | |
string | $trail | |
string | $prefix |
Definition at line 1863 of file Parser.php.
References Linker::splitTrail().
Parser::makeLinkHolder | ( | &$ | nt, | |
$ | text = '' , |
|||
$ | query = '' , |
|||
$ | trail = '' , |
|||
$ | prefix = '' | |||
) |
Make a link placeholder.
The text returned can be later resolved to a real link with replaceLinkHolders(). This is done for two reasons: firstly to avoid further parsing of interwiki links, and secondly to allow all existence checks and article length checks (for stub links) to be bundled into a single query.
Definition at line 1845 of file Parser.php.
Parser::markerSkipCallback | ( | $ | s, | |
$ | callback | |||
) |
Parser::maybeDoSubpageLink | ( | $ | target, | |
&$ | text | |||
) | [private] |
Handle link to subpage if necessary.
string | $target the source of the link | |
string | &$text the link text, modified as necessary |
Definition at line 1902 of file Parser.php.
References Linker::normalizeSubpageLink().
Referenced by replaceInternalLinks2(), and Parser_LinkHooks::replaceInternalLinksCallback().
Parser::maybeMakeExternalImage | ( | $ | url | ) |
make an image if it's allowed, either through the global option, through the exception, or through the on-wiki whitelist
Definition at line 1453 of file Parser.php.
References $url, and wfMsgForContent().
Referenced by makeFreeExternalLink(), and replaceExternalLinks().
static Parser::mergeSectionTrees | ( | $ | tree1, | |
$ | tree2, | |||
$ | section, | |||
$ | title, | |||
$ | len2 | |||
) | [static] |
Merge $tree2 into $tree1 by replacing the section with index $section in $tree1 and its descendants with the sections in $tree2.
Note that in the returned section tree, only the 'index' and 'byteoffset' fields are guaranteed to be correct.
$tree1 | array Section tree from ParserOutput::getSectons() | |
$tree2 | array Section tree | |
$section | int Section index | |
$title | Title Title both section trees come from | |
$len2 | int Length of the original wikitext for $tree2 |
Definition at line 3850 of file Parser.php.
References $s, $section, and Title::getPrefixedDBkey().
Parser::nextItem | ( | $ | char | ) |
Definition at line 1950 of file Parser.php.
Parser::nextLinkID | ( | ) |
Definition at line 533 of file Parser.php.
Parser::openList | ( | $ | char | ) |
Parser::Options | ( | $ | x = null |
) |
Parser::OutputType | ( | $ | x = null |
) |
Parser::parse | ( | $ | text, | |
Title $ | title, | |||
ParserOptions $ | options, | |||
$ | linestart = true , |
|||
$ | clearState = true , |
|||
$ | revid = null | |||
) |
Convert wikitext to HTML Do not call this function recursively.
$text | String: text we want to parse | |
$title | A title object | |
$options | ParserOptions | |
$linestart | boolean | |
$clearState | boolean | |
$revid | Int: number to pass in {{REVISIONID}} |
Definition at line 302 of file Parser.php.
References $fname, $output, $wgAlwaysUseTidy, $wgContLang, $wgDisableLangConversion, $wgDisableTitleConversion, $wgUseTidy, clearState(), CSS, doBlockLevels(), expand, extractTagsAndParams(), internalParse(), Sanitizer::normalizeCharReferences(), replaceLinkHolders(), setOutputType(), setTitle(), tidy(), wfGetCaller(), wfProfileIn(), and wfRunHooks().
Parser::preprocess | ( | $ | text, | |
$ | title, | |||
$ | options, | |||
$ | revid = null | |||
) |
Expand templates and variables in the text, producing valid, static wikitext.
Also removes comments.
Definition at line 502 of file Parser.php.
Parser::preprocessToDom | ( | $ | text, | |
$ | flags = 0 | |||
) |
Preprocess some wikitext and return the document tree.
This is the ghost of replace_variables().
string | $text The text to parse | |
integer | flags Bitwise combination of: self::PTD_FOR_INCLUSION Handle <noinclude>/<includeonly> as if the text is being included. Default is to assume a direct page view. |
Any flag added to the $flags parameter here, or any other parameter liable to cause a change in the DOM tree for a given text, must be passed through the section identifier in the section edit link and thus back to extractSections().
The output of this function is currently only cached in process memory, but a persistent cache may be implemented at a later date which takes further advantage of these strict dependency requirements.
Definition at line 2674 of file Parser.php.
Referenced by internalParse().
Parser::preSaveTransform | ( | $ | text, | |
Title $ | title, | |||
$ | user, | |||
$ | options, | |||
$ | clearState = true | |||
) |
Transform wiki markup when saving a page by doing
->
conversion, substitting signatures, {{subst:}} templates, etc.
string | $text the text to transform | |
Title | &$title the Title object for the current article | |
User | $user the User object describing the current user | |
ParserOptions | $options parsing options | |
bool | $clearState whether to clear the parser state first |
Definition at line 3940 of file Parser.php.
Parser::pstPass2 | ( | $ | text, | |
$ | user | |||
) |
Pre-save transform helper function.
Definition at line 3962 of file Parser.php.
References $t, $wgLegalTitleChars, $wgLocaltimezone, wfEmptyMsg(), wfMsgForContent(), and wfTimestamp().
Parser::recursiveTagParse | ( | $ | text, | |
$ | frame = false | |||
) |
Recursive parser entry point that can be called from an extension tag hook.
If $frame is not provided, then template variables (e.g., {{{1}}}) within $text are not expanded
$text | String: text extension wants to have parsed | |
PPFrame | $frame: The frame to use for expanding any template variables |
Definition at line 489 of file Parser.php.
Parser::renderImageGallery | ( | $ | text, | |
$ | params | |||
) |
Renders an image gallery from a text with one line per image.
text labels may be given by using |-style alternative text. E.g. Image:one.jpg|The number "1" Image:tree.jpg|A tree given as text will return the HTML of a gallery with two images, labeled 'The number "1"' and 'A tree'.
Definition at line 4370 of file Parser.php.
References StringUtils::explode(), Title::newFromText(), Sanitizer::validateTagAttributes(), and wfRunHooks().
Parser::replaceExternalLinks | ( | $ | text | ) | [private] |
Replace external links (REL).
Note: this is all very hackish and the order of execution matters a lot. Make sure to run maintenance/parserTests.php if you change this code.
Definition at line 1299 of file Parser.php.
References $i, $s, $url, Sanitizer::cleanUrl(), getExternalLinkAttribs(), getFunctionLang(), maybeMakeExternalImage(), replaceUnusualEscapes(), Linker::splitTrail(), wfProfileIn(), wfProfileOut(), and wfUrlProtocols().
Referenced by internalParse(), and replaceInternalLinks2().
Parser::replaceInternalLinks | ( | $ | s | ) |
Process [[ ]] wikilinks.
Definition at line 1502 of file Parser.php.
References $s, and replaceInternalLinks2().
Referenced by internalParse().
Parser::replaceInternalLinks2 | ( | &$ | s | ) |
Process [[ ]] wikilinks (RIL).
Reimplemented in Parser_LinkHooks.
Definition at line 1513 of file Parser.php.
References $s, areSubpagesAllowed(), armorLinks(), Sanitizer::decodeCharReferences(), StringUtils::explode(), getDefaultSort(), Title::legalChars(), makeImage(), maybeDoSubpageLink(), Title::newFromText(), replaceExternalLinks(), wfMsgForContent(), wfProfileIn(), wfProfileOut(), and wfUrlProtocols().
Referenced by replaceInternalLinks().
Parser::replaceLinkHolders | ( | &$ | text, | |
$ | options = 0 | |||
) |
FIXME: update documentation.
makeLinkObj() is deprecated. Replace link placeholders with actual links, in the buffer Placeholders created in Skin::makeLinkObj() Returns an array of link CSS classes, indexed by PDBK.
Definition at line 4347 of file Parser.php.
Referenced by parse().
Parser::replaceLinkHoldersText | ( | $ | text | ) |
Replace link placeholders with plain text of links (not HTML-formatted).
string | $text |
Definition at line 4357 of file Parser.php.
Parser::replaceSection | ( | $ | oldtext, | |
$ | section, | |||
$ | text | |||
) |
static Parser::replaceUnusualEscapes | ( | $ | url | ) | [static] |
Replace unusual URL escape codes with their equivalent characters.
string |
Definition at line 1424 of file Parser.php.
References $url.
Referenced by makeFreeExternalLink(), and replaceExternalLinks().
static Parser::replaceUnusualEscapesCallback | ( | $ | matches | ) | [static, private] |
Callback function used in replaceUnusualEscapes().
Replaces unusual URL escape codes with their equivalent character
Definition at line 1435 of file Parser.php.
Parser::replaceVariables | ( | $ | text, | |
$ | frame = false , |
|||
$ | argsOnly = false | |||
) |
Replace magic variables, templates, and template arguments with the appropriate text.
Templates are substituted recursively, taking care to avoid infinite loops.
Note that the substitution depends on value of $mOutputType: self::OT_WIKI: only {{subst:}} templates self::OT_PREPROCESS: templates but not extension tags self::OT_HTML: all templates and extension tags
string | $tex The text to transform | |
PPFrame | $frame Object describing the arguments passed to the template. Arguments may also be provided as an associative array, as was the usual case before MW1.12. Providing arguments this way may be useful for extensions wishing to perform variable replacement explicitly. | |
bool | $argsOnly Only do argument (triple-brace) expansion, not double-brace expansion |
Definition at line 2712 of file Parser.php.
References PPFrame::NO_TEMPLATES, wfDebug(), wfProfileIn(), and wfProfileOut().
Referenced by internalParse().
Parser::serialiseHalfParsedText | ( | $ | text | ) |
Definition at line 5079 of file Parser.php.
Parser::setDefaultSort | ( | $ | sort | ) |
Parser::setFunctionHook | ( | $ | id, | |
$ | callback, | |||
$ | flags = 0 | |||
) |
Create a function, e.g.
{{sum:1|2|3}} The callback function should have the form: function myParserFunction( &$parser, $arg1, $arg2, $arg3 ) { ... }
Or with SFH_OBJECT_ARGS: function myParserFunction( $parser, $frame, $args ) { ... }
The callback may either return the text result of the function, or an array with the text in element 0, and a number of flags in the other elements. The names of the flags are specified in the keys. Valid flags are: found The text returned is valid, stop processing the template. This is on by default. nowiki Wiki markup in the return value should be escaped isHTML The returned text is HTML, armour it against wikitext transformation
string | $id The magic word ID | |
mixed | $callback The callback function (and object) to use | |
integer | $flags a combination of the following flags: SFH_NO_HASH No leading hash, i.e. {{plural:...}} instead of {{if:...}} |
The $frame parameter is a PPFrame. This can be used to produce expanded text from the arguments, for instance: $text = isset( $args[0] ) ? $frame->expand( $args[0] ) : '';
For technical reasons, $args[0] is pre-expanded and will be a string. This may change in future versions. Please call $frame->expand() on it anyway so that your code keeps working if/when this is changed.
If you want whitespace to be trimmed from $args, you need to do it yourself, post- expansion.
Please read the documentation in includes/parser/Preprocessor.php for more information about the methods available in PPFrame and PPNode.
Definition at line 4282 of file Parser.php.
References MagicWord::get().
Parser::setFunctionTagHook | ( | $ | tag, | |
$ | callback, | |||
$ | flags | |||
) |
Create a tag function, e.g.
<test>some stuff</test>. Unlike tag hooks, tag functions are parsed at preprocessor level. Unlike parser functions, their content is not preprocessed.
Definition at line 4328 of file Parser.php.
Parser::setHook | ( | $ | tag, | |
$ | callback | |||
) |
Create an HTML-style tag, e.g.
<yourtag>special text</yourtag> The callback should have the following form: function myParserHook( $text, $params, &$parser ) { ... }
Transform and return $text. Use $parser for any required context, e.g. use $parser->getTitle() and $parser->getOptions() not $wgTitle or $wgOut->mParserOptions
mixed | $tag The tag to use, e.g. 'hook' for <hook> | |
mixed | $callback The callback function (and object) to use for the tag |
Definition at line 4211 of file Parser.php.
Referenced by Parser_LinkHooks::firstCallInit().
Parser::setOutputType | ( | $ | ot | ) |
Parser::setTitle | ( | $ | t | ) |
Set the context title.
Definition at line 258 of file Parser.php.
References $t, and Title::newFromText().
Referenced by parse().
Parser::setTransparentTagHook | ( | $ | tag, | |
$ | callback | |||
) |
Definition at line 4222 of file Parser.php.
static Parser::splitWhitespace | ( | $ | s | ) | [static] |
Parser::srvus | ( | $ | text | ) |
Definition at line 5019 of file Parser.php.
Parser::startExternalParse | ( | &$ | title, | |
$ | options, | |||
$ | outputType, | |||
$ | clearState = true | |||
) |
Set up some variables which are usually set up in parse() so that an external function can call some class members with confidence.
Definition at line 4161 of file Parser.php.
static Parser::statelessFetchTemplate | ( | $ | title, | |
$ | parser = false | |||
) | [static] |
Static function to get a template Can be overridden via ParserOptions::setTemplateCallback().
Definition at line 3151 of file Parser.php.
References $i, Title::getArticleID(), Title::getNamespace(), Title::getText(), Revision::newFromId(), Title::newFromRedirect(), Revision::newFromTitle(), LinkCache::singleton(), wfEmptyMsg(), wfMsgForContentNoTrans(), and wfRunHooks().
Parser::strip | ( | $ | text, | |
$ | state, | |||
$ | stripcomments = false , |
|||
$ | dontstrip = array () | |||
) |
Parser::stripAltText | ( | $ | caption, | |
$ | holders | |||
) | [protected] |
Parser::stripSectionName | ( | $ | text | ) |
Strips a text string of wikitext for use in a section anchor.
Accepts a text string and then removes all wikitext from the string and leaves only the resultant text (i.e. the result of [[User:WikiSysop|Sysop]] would be "Sysop" and the result of [[User:WikiSysop]] would be "User:WikiSysop") - this is intended to create valid section anchors by mimicing the output of the parser when headings are parsed.
$text | string Text string to be stripped of wikitext for use in a Section anchor |
Definition at line 5001 of file Parser.php.
References StringUtils::delimiterReplace(), and wfUrlProtocols().
Parser::testPreprocess | ( | $ | text, | |
$ | title, | |||
$ | options | |||
) |
Parser::testPst | ( | $ | text, | |
$ | title, | |||
$ | options | |||
) |
Parser::testSrvus | ( | $ | text, | |
$ | title, | |||
$ | options, | |||
$ | outputType = self::OT_HTML | |||
) |
strip/replaceVariables/unstrip for preprocessor regression testing
Definition at line 5026 of file Parser.php.
References Title::newFromText(), and Sanitizer::removeHTMLtags().
static Parser::tidy | ( | $ | text | ) | [static] |
Parser::Title | ( | $ | x = null |
) |
Parser::transformMsg | ( | $ | text, | |
$ | options | |||
) |
Wrapper for preprocess().
string | $text the text to preprocess | |
ParserOptions | $options options |
Definition at line 4178 of file Parser.php.
References $wgTitle, wfProfileIn(), and wfProfileOut().
Parser::uniqPrefix | ( | ) |
Parser::unserialiseHalfParsedText | ( | $ | data, | |
$ | intPrefix = null | |||
) |
Definition at line 5140 of file Parser.php.
Parser::unstrip | ( | $ | text, | |
$ | state | |||
) | [private] |
Restores pre, math, and other extensions removed by strip().
always call unstripNoWiki() after this one
Definition at line 658 of file Parser.php.
Parser::unstripForHTML | ( | $ | text | ) |
Parser::unstripNoWiki | ( | $ | text, | |
$ | state | |||
) | [private] |
Always call this after unstrip() to preserve the order.
Definition at line 668 of file Parser.php.
Parser::validateSig | ( | $ | text | ) |
Check that the user's signature contains no bad XML.
string | $text |
Definition at line 4099 of file Parser.php.
References Xml::isWellFormedXmlFragment().
Parser::$mArgStack |
Definition at line 101 of file Parser.php.
Parser::$mAutonumber |
Definition at line 100 of file Parser.php.
Parser::$mConf |
Definition at line 93 of file Parser.php.
Parser::$mDefaultSort |
Definition at line 103 of file Parser.php.
Parser::$mDefaultStripList |
Definition at line 93 of file Parser.php.
Parser::$mDoubleUnderscores |
Definition at line 105 of file Parser.php.
Parser::$mDTopen |
Definition at line 100 of file Parser.php.
Parser::$mExpensiveFunctionCount |
Definition at line 106 of file Parser.php.
Parser::$mExtLinkBracketedRegex |
Definition at line 93 of file Parser.php.
Parser::$mFunctionHooks |
Definition at line 93 of file Parser.php.
Parser::$mFunctionSynonyms |
Definition at line 93 of file Parser.php.
Parser::$mFunctionTagHooks |
Definition at line 93 of file Parser.php.
Parser::$mHeadings |
Definition at line 105 of file Parser.php.
Parser::$mImageParams |
Definition at line 93 of file Parser.php.
Parser::$mImageParamsMagicArray |
Definition at line 93 of file Parser.php.
Parser::$mIncludeCount |
Definition at line 101 of file Parser.php.
Parser::$mIncludeSizes |
Definition at line 103 of file Parser.php.
Parser::$mInPre |
Definition at line 101 of file Parser.php.
Parser::$mLastSection |
Definition at line 101 of file Parser.php.
Parser::$mLinkHolders |
Definition at line 102 of file Parser.php.
Parser::$mLinkID |
Definition at line 102 of file Parser.php.
Parser::$mMarkerIndex |
Definition at line 93 of file Parser.php.
Parser::$mOptions |
Definition at line 110 of file Parser.php.
Parser::$mOutput |
Definition at line 100 of file Parser.php.
Parser::$mOutputType |
Definition at line 110 of file Parser.php.
Parser::$mPPNodeCount |
Definition at line 103 of file Parser.php.
Parser::$mPreprocessor |
Definition at line 93 of file Parser.php.
Parser::$mRevIdForTs |
Definition at line 110 of file Parser.php.
Parser::$mRevisionId |
Definition at line 110 of file Parser.php.
Parser::$mRevisionTimestamp |
Definition at line 110 of file Parser.php.
Parser::$mStripList |
Definition at line 93 of file Parser.php.
Parser::$mStripState |
Definition at line 100 of file Parser.php.
Parser::$mSubstWords |
Definition at line 93 of file Parser.php.
Parser::$mTagHooks |
Parser::$mTitle |
Definition at line 110 of file Parser.php.
Parser::$mTplDomCache |
Definition at line 105 of file Parser.php.
Parser::$mTplExpandCache |
Definition at line 104 of file Parser.php.
Parser::$mTplRedirCache |
Definition at line 105 of file Parser.php.
Parser::$mTransparentTagHooks |
Definition at line 93 of file Parser.php.
Parser::$mUrlProtocols |
Definition at line 93 of file Parser.php.
Parser::$mVarCache |
Definition at line 93 of file Parser.php.
Parser::$mVariables |
Definition at line 93 of file Parser.php.
Parser::$ot |
const Parser::COLON_STATE_CLOSETAG = 3 |
Definition at line 70 of file Parser.php.
const Parser::COLON_STATE_COMMENT = 5 |
Definition at line 72 of file Parser.php.
const Parser::COLON_STATE_COMMENTDASH = 6 |
Definition at line 73 of file Parser.php.
const Parser::COLON_STATE_COMMENTDASHDASH = 7 |
Definition at line 74 of file Parser.php.
const Parser::COLON_STATE_TAG = 1 |
Definition at line 68 of file Parser.php.
const Parser::COLON_STATE_TAGSLASH = 4 |
Definition at line 71 of file Parser.php.
const Parser::COLON_STATE_TAGSTART = 2 |
Definition at line 69 of file Parser.php.
const Parser::COLON_STATE_TEXT = 0 |
Definition at line 67 of file Parser.php.
const Parser::EXT_IMAGE_REGEX |
Initial value:
'/^(http:\/\/|https:\/\/)([^][<>"\\x00-\\x20\\x7F]+) \\/([A-Za-z0-9_.,~%\\-+&;#*?!=()@\\x80-\\xFF]+)\\.((?i)gif|png|jpg|jpeg)$/Sx'
Reimplemented in Parser_LinkHooks.
Definition at line 63 of file Parser.php.
const Parser::EXT_LINK_URL_CLASS = '[^][<>"\\x00-\\x20\\x7F]' |
const Parser::MARKER_SUFFIX = "-QINU\x7f" |
Definition at line 87 of file Parser.php.
Referenced by CoreParserFunctions::displaytitle(), PPFrame_Hash::expand(), and PPFrame_DOM::expand().
const Parser::OT_HTML = 1 |
Definition at line 81 of file Parser.php.
const Parser::OT_MSG = 3 |
Definition at line 84 of file Parser.php.
const Parser::OT_PREPROCESS = 3 |
Definition at line 83 of file Parser.php.
const Parser::OT_WIKI = 2 |
Definition at line 82 of file Parser.php.
const Parser::PTD_FOR_INCLUSION = 1 |
Definition at line 77 of file Parser.php.
Referenced by internalParse(), Preprocessor_Hash::preprocessToObj(), and Preprocessor_DOM::preprocessToXml().
const Parser::SFH_NO_HASH = 1 |
Definition at line 57 of file Parser.php.
const Parser::SFH_OBJECT_ARGS = 2 |
Definition at line 58 of file Parser.php.
const Parser::VERSION = '1.6.4' |
Update this version number when the ParserOutput format changes in an incompatible way, so the parser cache can automatically discard old data.
Reimplemented in Parser_LinkHooks.
Definition at line 53 of file Parser.php.
Referenced by ParserOutput::expired().