MediaWiki  REL1_24
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:

List of all members.

Public Member Functions

 __construct ($preprocessor)
 Construct a new preprocessor frame.
 __toString ()
 cachedExpand ($key, $root, $flags=0)
 expand ($root, $flags=0)
 getArgument ($name)
 Get an argument to this frame by 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

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 957 of file Preprocessor_DOM.php.


Constructor & Destructor Documentation

PPFrame_DOM::__construct ( preprocessor)

Construct a new preprocessor frame.

Parameters:
Preprocessor$preprocessorThe parent preprocessor

Definition at line 996 of file Preprocessor_DOM.php.

References $preprocessor, array(), false, and title.


Member Function Documentation

Reimplemented in PPCustomFrame_DOM, and PPTemplateFrame_DOM.

Definition at line 1436 of file Preprocessor_DOM.php.

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 1060 of file Preprocessor_DOM.php.

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

Implements PPFrame.

Definition at line 1071 of file Preprocessor_DOM.php.

Get an argument to this frame by name.

Parameters:
string$name
Returns:
bool

Implements PPFrame.

Reimplemented in PPCustomFrame_DOM, and PPTemplateFrame_DOM.

Definition at line 1478 of file Preprocessor_DOM.php.

Returns:
array

Implements PPFrame.

Reimplemented in PPCustomFrame_DOM, and PPTemplateFrame_DOM.

Definition at line 1451 of file Preprocessor_DOM.php.

Returns:
array

Implements PPFrame.

Reimplemented in PPTemplateFrame_DOM.

Definition at line 1465 of file Preprocessor_DOM.php.

Returns:
array

Implements PPFrame.

Reimplemented in PPTemplateFrame_DOM.

Definition at line 1458 of file Preprocessor_DOM.php.

PPFrame_DOM::getPDBK ( level = false)

Definition at line 1440 of file Preprocessor_DOM.php.

Get a title of frame.

Returns:
Title

Implements PPFrame.

Definition at line 1506 of file Preprocessor_DOM.php.

References title.

Get the TTL.

Returns:
int|null

Implements PPFrame.

Definition at line 1544 of file Preprocessor_DOM.php.

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 1347 of file Preprocessor_DOM.php.

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

Implements PPFrame.

Definition at line 1315 of file Preprocessor_DOM.php.

Returns true if there are no arguments in this frame.

Returns:
bool

Implements PPFrame.

Reimplemented in PPCustomFrame_DOM, and PPTemplateFrame_DOM.

Definition at line 1474 of file Preprocessor_DOM.php.

Return true if the frame is a template frame.

Returns:
bool

Implements PPFrame.

Reimplemented in PPTemplateFrame_DOM.

Definition at line 1497 of file Preprocessor_DOM.php.

Get the volatile flag.

Returns:
bool

Implements PPFrame.

Definition at line 1524 of file Preprocessor_DOM.php.

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 1488 of file Preprocessor_DOM.php.

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 1015 of file Preprocessor_DOM.php.

PPFrame_DOM::setTTL ( ttl)

Set the TTL.

Parameters:
int$ttl

Implements PPFrame.

Reimplemented in PPTemplateFrame_DOM.

Definition at line 1533 of file Preprocessor_DOM.php.

References $ttl.

Set the volatile flag.

Parameters:
bool$flag

Implements PPFrame.

Reimplemented in PPTemplateFrame_DOM.

Definition at line 1515 of file Preprocessor_DOM.php.

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 1411 of file Preprocessor_DOM.php.

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 1379 of file Preprocessor_DOM.php.


Member Data Documentation

array PPFrame_DOM::$childExpansionCache [protected]

Definition at line 990 of file Preprocessor_DOM.php.

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 983 of file Preprocessor_DOM.php.

PPFrame_DOM::$loopCheckHash

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

Definition at line 977 of file Preprocessor_DOM.php.

Parser PPFrame_DOM::$parser

Definition at line 966 of file Preprocessor_DOM.php.

Preprocessor PPFrame_DOM::$preprocessor

Definition at line 962 of file Preprocessor_DOM.php.

Referenced by __construct(), and PPCustomFrame_DOM\__toString().

Title PPFrame_DOM::$title

Definition at line 970 of file Preprocessor_DOM.php.

PPFrame_DOM::$titleCache

Definition at line 971 of file Preprocessor_DOM.php.

PPFrame_DOM::$ttl = null [private]

Definition at line 986 of file Preprocessor_DOM.php.

Referenced by setTTL().

PPFrame_DOM::$volatile = false [private]

Definition at line 985 of file Preprocessor_DOM.php.


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