MediaWiki  1.27.1
Preprocessor Class Reference
Inheritance 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

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 29 of file Preprocessor.php.

Member Function Documentation

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 89 of file Preprocessor.php.

References $cache, $flags, $key, $value, $version, class, ObjectCache\getInstance(), RequestContext\getMain(), and wfMemcKey().

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

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

Store a document tree in the cache.

Parameters
string$text
int$flags

Definition at line 60 of file Preprocessor.php.

References $cache, $flags, $key, $value, class, ObjectCache\getInstance(), RequestContext\getMain(), and wfMemcKey().

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

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
Preprocessor::newFrame ( )
abstract

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

Returns
PPFrame
Preprocessor::newPartNodeArray (   $values)
abstract

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

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

Preprocess text to a PPNode.

Parameters
string$text
int$flags
Returns
PPNode

Member Data Documentation

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

Brace matching rules.

Definition at line 36 of file Preprocessor.php.

const Preprocessor::CACHE_VERSION = 1

Definition at line 31 of file Preprocessor.php.


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