Public Member Functions | |
__construct ($parser) | |
Create a new preprocessor object based on an initialised Parser object. | |
newFrame () | |
Create a new top-level frame for expansion of a page. | |
newCustomFrame ($args) | |
Create a new custom frame for programmatic use of parameter replacement as used in some extensions. | |
memCheck () | |
preprocessToObj ($text, $flags=0) | |
Preprocess some wikitext and return the document tree. | |
preprocessToXml ($text, $flags=0) | |
Public Attributes | |
$parser | |
$memoryLimit | |
const | CACHE_VERSION = 1 |
Definition at line 6 of file Preprocessor_DOM.php.
Preprocessor_DOM::__construct | ( | $ | parser | ) |
Create a new preprocessor object based on an initialised Parser object.
Implements Preprocessor.
Definition at line 11 of file Preprocessor_DOM.php.
References $parser.
Preprocessor_DOM::memCheck | ( | ) |
Preprocessor_DOM::newCustomFrame | ( | $ | args | ) |
Create a new custom frame for programmatic use of parameter replacement as used in some extensions.
Implements Preprocessor.
Definition at line 28 of file Preprocessor_DOM.php.
References $args.
Preprocessor_DOM::newFrame | ( | ) |
Create a new top-level frame for expansion of a page.
Implements Preprocessor.
Definition at line 24 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 | |
integer | flags Bitwise combination of: Parser::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.
Implements Preprocessor.
Definition at line 66 of file Preprocessor_DOM.php.
References $flags, $obj, $result, $text, $version, $wgMemc, $wgPreprocessorCacheThreshold, UtfNormal::cleanUp(), preprocessToXml(), wfDebugLog(), wfMemcKey(), wfProfileIn(), wfProfileOut(), wfRestoreWarnings(), and wfSuppressWarnings().
Preprocessor_DOM::preprocessToXml | ( | $ | text, | |
$ | flags = 0 | |||
) |
Definition at line 121 of file Preprocessor_DOM.php.
References $flags, $text, Parser::PTD_FOR_INCLUSION, and wfProfileIn().
Referenced by preprocessToObj().
Preprocessor_DOM::$memoryLimit |
Definition at line 7 of file Preprocessor_DOM.php.
Preprocessor_DOM::$parser |
const Preprocessor_DOM::CACHE_VERSION = 1 |
Definition at line 9 of file Preprocessor_DOM.php.