MediaWiki REL1_31
PPFrame_DOM Class Reference

An expansion frame, used as a context to expand the result of preprocessToObj() More...

Inheritance diagram for PPFrame_DOM:
Collaboration diagram for PPFrame_DOM:

Public Member Functions

 __construct ( $preprocessor)
 Construct a new preprocessor frame.
 
 __toString ()
 
 cachedExpand ( $key, $root, $flags=0)
 
 expand ( $root, $flags=0)
 
 getArgument ( $name)
 
 getArguments ()
 
 getNamedArguments ()
 
 getNumberedArguments ()
 
 getPDBK ( $level=false)
 
 getTitle ()
 Get a title of frame.
 
 getTTL ()
 Get the TTL.
 
 implode ( $sep)
 Implode with no flags specified This previously called implodeWithFlags but has now been inlined to reduce stack depth.
 
 implodeWithFlags ( $sep, $flags)
 
 isEmpty ()
 Returns true if there are no arguments in this frame.
 
 isTemplate ()
 Return true if the frame is a template frame.
 
 isVolatile ()
 Get the volatile flag.
 
 loopCheck ( $title)
 Returns true if the infinite loop check is OK, false if a loop is detected.
 
 newChild ( $args=false, $title=false, $indexOffset=0)
 Create a new child frame $args is optionally a multi-root PPNode or array containing the template arguments.
 
 setTTL ( $ttl)
 Set the TTL.
 
 setVolatile ( $flag=true)
 Set the volatile flag.
 
 virtualBracketedImplode ( $start, $sep, $end)
 Virtual implode with brackets.
 
 virtualImplode ( $sep)
 Makes an object that, when expand()ed, will be the same as one obtained with implode()
 

Public Attributes

 $depth
 Recursion depth of this frame, top = 0 Note that this is NOT the same as expansion depth in expand()
 
 $loopCheckHash
 Hashtable listing templates which are disallowed for expansion in this frame, having been encountered previously in parent frames.
 
Parser $parser
 
Preprocessor $preprocessor
 
Title $title
 
 $titleCache
 
- Public Attributes inherited from PPFrame
const NO_ARGS = 1
 
const NO_IGNORE = 8
 
const NO_TAGS = 32
 
const NO_TEMPLATES = 2
 
const RECOVER_COMMENTS = 16
 
const RECOVER_ORIG = 59
 
const STRIP_COMMENTS = 4
 
const SUPPORTS_INDEX_OFFSET = 1
 This constant exists when $indexOffset is supported in newChild()
 

Protected Attributes

array $childExpansionCache
 

Private Attributes

 $ttl = null
 
 $volatile = false
 

Detailed Description

An expansion frame, used as a context to expand the result of preprocessToObj()

Definition at line 1045 of file Preprocessor_DOM.php.

Constructor & Destructor Documentation

◆ __construct()

PPFrame_DOM::__construct ( $preprocessor)

Construct a new preprocessor frame.

Parameters
Preprocessor$preprocessorThe parent preprocessor

Definition at line 1087 of file Preprocessor_DOM.php.

Member Function Documentation

◆ __toString()

PPFrame_DOM::__toString ( )

Reimplemented in PPTemplateFrame_DOM, and PPCustomFrame_DOM.

Definition at line 1540 of file Preprocessor_DOM.php.

◆ cachedExpand()

PPFrame_DOM::cachedExpand ( $key,
$root,
$flags = 0 )
Exceptions
MWException
Parameters
string | int$key
string | PPNode_DOM | DOMDocument$root
int$flags
Returns
string

Implements PPFrame.

Reimplemented in PPTemplateFrame_DOM.

Definition at line 1165 of file Preprocessor_DOM.php.

◆ expand()

PPFrame_DOM::expand ( $root,
$flags = 0 )
Exceptions
MWException
Parameters
string | PPNode_DOM | DOMDocument$root
int$flags
Returns
string

Implements PPFrame.

Definition at line 1176 of file Preprocessor_DOM.php.

◆ getArgument()

PPFrame_DOM::getArgument ( $name)
Parameters
int | string$name
Returns
bool Always false in this implementation.

Implements PPFrame.

Reimplemented in PPCustomFrame_DOM, and PPTemplateFrame_DOM.

Definition at line 1586 of file Preprocessor_DOM.php.

◆ getArguments()

PPFrame_DOM::getArguments ( )
Returns
array

Implements PPFrame.

Reimplemented in PPTemplateFrame_DOM, and PPCustomFrame_DOM.

Definition at line 1555 of file Preprocessor_DOM.php.

◆ getNamedArguments()

PPFrame_DOM::getNamedArguments ( )
Returns
array

Implements PPFrame.

Reimplemented in PPTemplateFrame_DOM.

Definition at line 1569 of file Preprocessor_DOM.php.

◆ getNumberedArguments()

PPFrame_DOM::getNumberedArguments ( )
Returns
array

Implements PPFrame.

Reimplemented in PPTemplateFrame_DOM.

Definition at line 1562 of file Preprocessor_DOM.php.

◆ getPDBK()

PPFrame_DOM::getPDBK ( $level = false)

Definition at line 1544 of file Preprocessor_DOM.php.

◆ getTitle()

PPFrame_DOM::getTitle ( )

Get a title of frame.

Returns
Title

Implements PPFrame.

Definition at line 1614 of file Preprocessor_DOM.php.

◆ getTTL()

PPFrame_DOM::getTTL ( )

Get the TTL.

Returns
int|null

Implements PPFrame.

Definition at line 1652 of file Preprocessor_DOM.php.

◆ implode()

PPFrame_DOM::implode ( $sep)

Implode with no flags specified This previously called implodeWithFlags but has now been inlined to reduce stack depth.

Parameters
string$sep
string | PPNode_DOM | DOMDocument$args,...
Returns
string

Implements PPFrame.

Definition at line 1451 of file Preprocessor_DOM.php.

◆ implodeWithFlags()

PPFrame_DOM::implodeWithFlags ( $sep,
$flags )
Parameters
string$sep
int$flags
string | PPNode_DOM | DOMDocument$args,...
Returns
string

Implements PPFrame.

Definition at line 1419 of file Preprocessor_DOM.php.

◆ isEmpty()

PPFrame_DOM::isEmpty ( )

Returns true if there are no arguments in this frame.

Returns
bool

Implements PPFrame.

Reimplemented in PPTemplateFrame_DOM, and PPCustomFrame_DOM.

Definition at line 1578 of file Preprocessor_DOM.php.

◆ isTemplate()

PPFrame_DOM::isTemplate ( )

Return true if the frame is a template frame.

Returns
bool

Implements PPFrame.

Reimplemented in PPTemplateFrame_DOM.

Definition at line 1605 of file Preprocessor_DOM.php.

◆ isVolatile()

PPFrame_DOM::isVolatile ( )

Get the volatile flag.

Returns
bool

Implements PPFrame.

Definition at line 1632 of file Preprocessor_DOM.php.

◆ loopCheck()

PPFrame_DOM::loopCheck ( $title)

Returns true if the infinite loop check is OK, false if a loop is detected.

Parameters
Title$title
Returns
bool

Implements PPFrame.

Definition at line 1596 of file Preprocessor_DOM.php.

◆ newChild()

PPFrame_DOM::newChild ( $args = false,
$title = false,
$indexOffset = 0 )

Create a new child frame $args is optionally a multi-root PPNode or array containing the template arguments.

Parameters
bool | array$args
Title | bool$title
int$indexOffset
Returns
PPTemplateFrame_DOM

Implements PPFrame.

Definition at line 1106 of file Preprocessor_DOM.php.

◆ setTTL()

PPFrame_DOM::setTTL ( $ttl)

Set the TTL.

Parameters
int$ttl

Implements PPFrame.

Reimplemented in PPTemplateFrame_DOM.

Definition at line 1641 of file Preprocessor_DOM.php.

◆ setVolatile()

PPFrame_DOM::setVolatile ( $flag = true)

Set the volatile flag.

Parameters
bool$flag

Implements PPFrame.

Reimplemented in PPTemplateFrame_DOM.

Definition at line 1623 of file Preprocessor_DOM.php.

◆ virtualBracketedImplode()

PPFrame_DOM::virtualBracketedImplode ( $start,
$sep,
$end )

Virtual implode with brackets.

Parameters
string$start
string$sep
string$end
string | PPNode_DOM | DOMDocument$args,...
Returns
array

Implements PPFrame.

Definition at line 1515 of file Preprocessor_DOM.php.

◆ virtualImplode()

PPFrame_DOM::virtualImplode ( $sep)

Makes an object that, when expand()ed, will be the same as one obtained with implode()

Parameters
string$sep
string | PPNode_DOM | DOMDocument$args,...
Returns
array

Implements PPFrame.

Definition at line 1483 of file Preprocessor_DOM.php.

Member Data Documentation

◆ $childExpansionCache

array PPFrame_DOM::$childExpansionCache
protected

Definition at line 1081 of file Preprocessor_DOM.php.

◆ $depth

PPFrame_DOM::$depth

Recursion depth of this frame, top = 0 Note that this is NOT the same as expansion depth in expand()

Definition at line 1073 of file Preprocessor_DOM.php.

◆ $loopCheckHash

PPFrame_DOM::$loopCheckHash

Hashtable listing templates which are disallowed for expansion in this frame, having been encountered previously in parent frames.

Definition at line 1067 of file Preprocessor_DOM.php.

◆ $parser

Parser PPFrame_DOM::$parser

Definition at line 1055 of file Preprocessor_DOM.php.

◆ $preprocessor

Preprocessor PPFrame_DOM::$preprocessor

Definition at line 1050 of file Preprocessor_DOM.php.

◆ $title

Title PPFrame_DOM::$title

Definition at line 1060 of file Preprocessor_DOM.php.

◆ $titleCache

PPFrame_DOM::$titleCache

Definition at line 1061 of file Preprocessor_DOM.php.

◆ $ttl

PPFrame_DOM::$ttl = null
private

Definition at line 1076 of file Preprocessor_DOM.php.

◆ $volatile

PPFrame_DOM::$volatile = false
private

Definition at line 1075 of file Preprocessor_DOM.php.


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