MediaWiki  REL1_19
Preprocessor_DOM Class Reference
Inheritance diagram for Preprocessor_DOM:
Collaboration diagram for Preprocessor_DOM:

List of all members.

Public Member Functions

 __construct ($parser)
 Create a new preprocessor object based on an initialised Parser object.
 memCheck ()
 newCustomFrame ($args)
 newFrame ()
 newPartNodeArray ($values)
 preprocessToObj ($text, $flags=0)
 Preprocess some wikitext and return the document tree.
 preprocessToXml ($text, $flags=0)

Public Attributes

 $memoryLimit
 $parser
const CACHE_VERSION = 1

Detailed Description

Definition at line 12 of file Preprocessor_DOM.php.


Constructor & Destructor Documentation

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

Parameters:
$parserParser

Implements Preprocessor.

Definition at line 23 of file Preprocessor_DOM.php.

References $parser.


Member Function Documentation

Exceptions:
MWException
Returns:
bool

Definition at line 82 of file Preprocessor_DOM.php.

References $limit.

Parameters:
$args
Returns:
PPCustomFrame_DOM

Implements Preprocessor.

Definition at line 47 of file Preprocessor_DOM.php.

Returns:
PPFrame_DOM

Implements Preprocessor.

Definition at line 39 of file Preprocessor_DOM.php.

Parameters:
$values
Returns:
PPNode_DOM

Implements Preprocessor.

Definition at line 55 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().

Parameters:
$textString: the text to parse
$flagsInteger: 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.

Returns:
PPNode_DOM

Implements Preprocessor.

Definition at line 116 of file Preprocessor_DOM.php.

References $result, $version, $wgMemc, $wgPreprocessorCacheThreshold, UtfNormal\cleanUp(), preprocessToXml(), wfDebugLog(), wfMemcKey(), wfProfileIn(), wfProfileOut(), wfRestoreWarnings(), and wfSuppressWarnings().

Here is the call graph for this function:

Preprocessor_DOM::preprocessToXml ( text,
flags = 0 
)
Parameters:
$textstring
$flagsint
Returns:
string

Definition at line 178 of file Preprocessor_DOM.php.

References Parser\PTD_FOR_INCLUSION, and wfProfileIn().

Referenced by preprocessToObj().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Preprocessor_DOM::$memoryLimit

Definition at line 19 of file Preprocessor_DOM.php.

Preprocessor_DOM::$parser

Definition at line 17 of file Preprocessor_DOM.php.

Referenced by __construct().

Definition at line 21 of file Preprocessor_DOM.php.


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