手册:Preprocessor.php
Appearance
MediaWiki文件: Preprocessor.php | |
---|---|
位置: | includes/parser/ |
源代码: | master • 1.42.3 • 1.41.4 • 1.39.10 |
类: | Preprocessor |
The file Preprocessor.php contains the Preprocessor
class for preprocessors, which offers the PPFrame
and PPNode
interfaces.
Public methods
- resetParser() - To be removed when support for parser cloning is being phased out. Allows resetting the internal Parser reference after Preprocessor is cloned.
Abstract methods that return frames:
- newFrame() - create a new top-level frame for expansion of a page.
- newCustomFrame() - create a new custom frame for programmatic use of parameter replacement. This is useful for certain types of extensions.
Abstract methods that return nodes:
- newPartNodeArray() - create a new custom node for programmatic use of parameter replacement. This is useful for certain types of extensions.
- preprocessToObj() - Preprocess text and return a PPNode object. Both this method and Parser::preprocessToDom() , a wrapper for this method, can be used with the following flags (default: 0) :
- 1 = DOM_FOR_INCLUSION: treat the wikitext as transcluded content from a page rather than direct content of a page or message. By default, the text is assumed to be undergoing processing for use by direct page views. The use of this flag causes text within
<noinclude>
tags to be ignored, text within<includeonly>
to be included, and text outside of<onlyinclude>
to be ignored. - 2 = DOM_LANG_CONVERSION_DISABLED - Language conversion construct omission flag
- 4 = DOM_UNCACHED: disable use of the preprocessor cache.
- 1 = DOM_FOR_INCLUSION: treat the wikitext as transcluded content from a page rather than direct content of a page or message. By default, the text is assumed to be undergoing processing for use by direct page views. The use of this flag causes text within