MediaWiki
1.28.0
|
Differences from DOM schema: More...
Public Member Functions | |
__construct ($parser) | |
newCustomFrame ($args) | |
newFrame () | |
newPartNodeArray ($values) | |
preprocessToObj ($text, $flags=0) | |
Preprocess some wikitext and return the document tree. More... | |
Public Member Functions inherited from Preprocessor | |
newCustomFrame ($args) | |
Create a new custom frame for programmatic use of parameter replacement as used in some extensions. More... | |
newFrame () | |
Create a new top-level frame for expansion of a page. More... | |
newPartNodeArray ($values) | |
Create a new custom node for programmatic use of parameter replacement as used in some extensions. More... | |
preprocessToObj ($text, $flags=0) | |
Preprocess text to a PPNode. More... | |
Public Attributes | |
Parser | $parser |
const | CACHE_PREFIX = 'preprocess-hash' |
const | CACHE_VERSION = 2 |
Public Attributes inherited from Preprocessor | |
const | CACHE_VERSION = 1 |
Static Private Member Functions | |
static | addLiteral (array &$accum, $text) |
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... | |
array | cacheSetTree ($text, $flags, $tree) |
Store a document tree in the cache. More... | |
Protected Attributes inherited from Preprocessor | |
array | $rules |
Brace matching rules. More... | |
Differences from DOM schema:
Nodes are stored in a recursive array data structure. A node store is an array where each element may be either a scalar (representing a text node) or a "descriptor", which is a two-element array where the first element is the node name and the second element is the node store for the children.
Attributes are represented as children that have a node name starting with "@", and a single text node child.
Definition at line 43 of file Preprocessor_Hash.php.
Preprocessor_Hash::__construct | ( | $parser | ) |
Definition at line 54 of file Preprocessor_Hash.php.
References $parser.
|
staticprivate |
Definition at line 691 of file Preprocessor_Hash.php.
Preprocessor_Hash::newCustomFrame | ( | $args | ) |
array | $args |
Definition at line 69 of file Preprocessor_Hash.php.
References $args.
Preprocessor_Hash::newFrame | ( | ) |
Definition at line 61 of file Preprocessor_Hash.php.
Preprocessor_Hash::newPartNodeArray | ( | $values | ) |
array | $values |
Definition at line 77 of file Preprocessor_Hash.php.
References as.
Preprocessor_Hash::preprocessToObj | ( | $text, | |
$flags = 0 |
|||
) |
Preprocess some wikitext and return the document tree.
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 bug 4899.
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().
MWException |
Definition at line 119 of file Preprocessor_Hash.php.
References $count, $flags, $matches, $name, as, Preprocessor\cacheGetTree(), Preprocessor\cacheSetTree(), PPNode_Hash_Tree\NAME, and Parser\PTD_FOR_INCLUSION.
Parser Preprocessor_Hash::$parser |
Definition at line 49 of file Preprocessor_Hash.php.
Referenced by __construct().
const Preprocessor_Hash::CACHE_PREFIX = 'preprocess-hash' |
Definition at line 51 of file Preprocessor_Hash.php.
const Preprocessor_Hash::CACHE_VERSION = 2 |
Definition at line 52 of file Preprocessor_Hash.php.