MediaWiki
1.34.0
|
Public Member Functions | |
__construct ( $parser) | |
memCheck () | |
newCustomFrame ( $args) | |
newFrame () | |
newPartNodeArray ( $values) | |
preprocessToObj ( $text, $flags=0) | |
Preprocess some wikitext and return the document tree. More... | |
preprocessToXml ( $text, $flags=0) | |
Public Attributes | |
$memoryLimit | |
Parser | $parser |
const | CACHE_PREFIX = 'preprocess-xml' |
Public Attributes inherited from Preprocessor | |
Parser | $parser |
const | CACHE_VERSION = 1 |
Additional Inherited Members | |
Protected Member Functions inherited from Preprocessor | |
cacheGetTree ( $text, $flags) | |
Attempt to load a precomputed document tree for some given wikitext from the cache. More... | |
cacheSetTree ( $text, $flags, $tree) | |
Store a document tree in the cache. More... | |
Protected Attributes inherited from Preprocessor | |
array | $rules |
Brace matching rules. More... | |
Definition at line 29 of file Preprocessor_DOM.php.
Preprocessor_DOM::__construct | ( | $parser | ) |
Parser | $parser |
Definition at line 43 of file Preprocessor_DOM.php.
References $parser, and wfDeprecated().
Preprocessor_DOM::memCheck | ( | ) |
Preprocessor_DOM::newCustomFrame | ( | $args | ) |
array | $args |
Reimplemented from Preprocessor.
Definition at line 68 of file Preprocessor_DOM.php.
References $args.
Preprocessor_DOM::newFrame | ( | ) |
Reimplemented from Preprocessor.
Definition at line 60 of file Preprocessor_DOM.php.
Preprocessor_DOM::newPartNodeArray | ( | $values | ) |
array | $values |
MWException |
Reimplemented from Preprocessor.
Definition at line 77 of file Preprocessor_DOM.php.
Preprocessor_DOM::preprocessToObj | ( | $text, | |
$flags = 0 |
|||
) |
Preprocess some wikitext and return the document tree.
This is the ghost of Parser::replace_variables().
string | $text | The text to parse |
int | $flags | Bitwise combination of: Parser::PTD_FOR_INCLUSION Handle "<noinclude>" and "<includeonly>" as if the text is being included. Default is to assume a direct page view. |
The generated DOM tree must depend only on the input text and the flags. The DOM tree must be the same in OT_HTML and OT_WIKI mode, to avoid a regression of T6899.
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.
MWException |
Reimplemented from Preprocessor.
Definition at line 154 of file Preprocessor_DOM.php.
References Preprocessor\cacheGetTree(), Preprocessor\cacheSetTree(), and preprocessToXml().
Preprocessor_DOM::preprocessToXml | ( | $text, | |
$flags = 0 |
|||
) |
string | $text | |
int | $flags |
Definition at line 198 of file Preprocessor_DOM.php.
References $wgDisableLangConversion.
Referenced by preprocessToObj().
Preprocessor_DOM::$memoryLimit |
Definition at line 36 of file Preprocessor_DOM.php.
Parser Preprocessor_DOM::$parser |
Definition at line 34 of file Preprocessor_DOM.php.
Referenced by __construct().
const Preprocessor_DOM::CACHE_PREFIX = 'preprocess-xml' |
Definition at line 38 of file Preprocessor_DOM.php.