Preprocessor_Hash Class Reference
[Parser]

Differences from DOM schema: * attribute nodes are children * <h> nodes that aren't at the top are replaced with <possible-h>. More...

Inherits Preprocessor.

List of all members.

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.
 preprocessToObj ($text, $flags=0)
 Preprocess some wikitext and return the document tree.

Public Attributes

 $parser
const CACHE_VERSION = 1


Detailed Description

Differences from DOM schema: * attribute nodes are children * <h> nodes that aren't at the top are replaced with <possible-h>.

Definition at line 9 of file Preprocessor_Hash.php.


Constructor & Destructor Documentation

Preprocessor_Hash::__construct ( parser  ) 

Create a new preprocessor object based on an initialised Parser object.

Implements Preprocessor.

Definition at line 14 of file Preprocessor_Hash.php.

References $parser.


Member Function Documentation

Preprocessor_Hash::newCustomFrame ( args  ) 

Create a new custom frame for programmatic use of parameter replacement as used in some extensions.

Implements Preprocessor.

Definition at line 22 of file Preprocessor_Hash.php.

References $args.

Preprocessor_Hash::newFrame (  ) 

Create a new top-level frame for expansion of a page.

Implements Preprocessor.

Definition at line 18 of file Preprocessor_Hash.php.

Preprocessor_Hash::preprocessToObj ( text,
flags = 0 
)

Preprocess some wikitext and return the document tree.

This is the ghost of Parser::replace_variables().

Parameters:
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.
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().

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.

Access:
private

Implements Preprocessor.

Definition at line 48 of file Preprocessor_Hash.php.

References $count, $flags, $i, $name, $text, $version, $wgMemc, $wgPreprocessorCacheThreshold, is(), PPNode_Hash_Tree::newWithText(), out(), Parser::PTD_FOR_INCLUSION, wfDebugLog(), wfMemcKey(), wfProfileIn(), and wfProfileOut().


Member Data Documentation

Preprocessor_Hash::$parser

Definition at line 10 of file Preprocessor_Hash.php.

Referenced by __construct().

Definition at line 12 of file Preprocessor_Hash.php.


The documentation for this class was generated from the following file:

Generated on Sat Sep 5 02:08:45 2009 for MediaWiki by  doxygen 1.5.9