MediaWiki  master
Preprocessor Class Reference
Inheritance diagram for Preprocessor:
Collaboration diagram for Preprocessor:

Public Member Functions

 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_VERSION = 1
 

Protected Member Functions

 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

array $rules
 Brace matching rules. More...
 

Detailed Description

Definition at line 30 of file Preprocessor.php.

Member Function Documentation

◆ cacheGetTree()

Preprocessor::cacheGetTree (   $text,
  $flags 
)
protected

Attempt to load a precomputed document tree for some given wikitext from the cache.

Parameters
string$text
int$flags
Returns
PPNode_Hash_Tree|bool

Definition at line 105 of file Preprocessor.php.

References $args, $cache, RequestContext\getMain(), newCustomFrame(), newFrame(), newPartNodeArray(), and preprocessToObj().

Referenced by Preprocessor_Hash\preprocessToObj(), and Preprocessor_DOM\preprocessToObj().

◆ cacheSetTree()

array Preprocessor::cacheSetTree (   $text,
  $flags,
  $tree 
)
protected

Store a document tree in the cache.

Parameters
string$text
int$flags
string$tree

Definition at line 73 of file Preprocessor.php.

References $cache, and RequestContext\getMain().

Referenced by Preprocessor_DOM\preprocessToObj().

◆ newCustomFrame()

Preprocessor::newCustomFrame (   $args)
abstract

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

Parameters
array$args
Returns
PPFrame

Referenced by cacheGetTree().

◆ newFrame()

Preprocessor::newFrame ( )
abstract

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

Returns
PPFrame

Referenced by cacheGetTree().

◆ newPartNodeArray()

Preprocessor::newPartNodeArray (   $values)
abstract

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

Parameters
array$values

Referenced by cacheGetTree().

◆ preprocessToObj()

Preprocessor::preprocessToObj (   $text,
  $flags = 0 
)
abstract

Preprocess text to a PPNode.

Parameters
string$text
int$flags
Returns
PPNode

Referenced by cacheGetTree().

Member Data Documentation

◆ $parser

Parser Preprocessor::$parser

Definition at line 37 of file Preprocessor.php.

Referenced by Preprocessor_Hash\__construct().

◆ $rules

array Preprocessor::$rules
protected
Initial value:
= [
'{' => [
'end' => '}'

Brace matching rules.

Definition at line 42 of file Preprocessor.php.

◆ CACHE_VERSION

const Preprocessor::CACHE_VERSION = 1

Definition at line 32 of file Preprocessor.php.


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