MediaWiki  1.23.2
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. More...
 
 __toString ()
 
 expand ( $root, $flags=0)
 
 getArgument ( $name)
 Get an argument to this frame by name. More...
 
 getArguments ()
 
 getNamedArguments ()
 
 getNumberedArguments ()
 
 getPDBK ( $level=false)
 
 getTitle ()
 Get a title of frame. More...
 
 implode ( $sep)
 Implode with no flags specified This previously called implodeWithFlags but has now been inlined to reduce stack depth. More...
 
 implodeWithFlags ( $sep, $flags)
 
 isEmpty ()
 Returns true if there are no arguments in this frame. More...
 
 isTemplate ()
 Return true if the frame is a template frame. More...
 
 loopCheck ( $title)
 Returns true if the infinite loop check is OK, false if a loop is detected. More...
 
 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. More...
 
 virtualBracketedImplode ( $start, $sep, $end)
 Virtual implode with brackets. More...
 
 virtualImplode ( $sep)
 Makes an object that, when expand()ed, will be the same as one obtained with implode() More...
 

Public Attributes

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

Detailed Description

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

Definition at line 916 of file Preprocessor_DOM.php.

Constructor & Destructor Documentation

◆ __construct()

PPFrame_DOM::__construct (   $preprocessor)

Construct a new preprocessor frame.

Parameters
$preprocessorPreprocessor The parent preprocessor

Definition at line 947 of file Preprocessor_DOM.php.

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

Member Function Documentation

◆ __toString()

PPFrame_DOM::__toString ( )

Reimplemented in PPCustomFrame_DOM, and PPTemplateFrame_DOM.

Definition at line 1343 of file Preprocessor_DOM.php.

◆ expand()

PPFrame_DOM::expand (   $root,
  $flags = 0 
)

◆ getArgument()

PPFrame_DOM::getArgument (   $name)

Get an argument to this frame by name.

Implements PPFrame.

Reimplemented in PPTemplateFrame_DOM, and PPCustomFrame_DOM.

Definition at line 1385 of file Preprocessor_DOM.php.

◆ getArguments()

PPFrame_DOM::getArguments ( )
Returns
array

Implements PPFrame.

Reimplemented in PPCustomFrame_DOM, and PPTemplateFrame_DOM.

Definition at line 1358 of file Preprocessor_DOM.php.

References array().

◆ getNamedArguments()

PPFrame_DOM::getNamedArguments ( )
Returns
array

Implements PPFrame.

Reimplemented in PPTemplateFrame_DOM.

Definition at line 1372 of file Preprocessor_DOM.php.

References array().

◆ getNumberedArguments()

PPFrame_DOM::getNumberedArguments ( )
Returns
array

Implements PPFrame.

Reimplemented in PPTemplateFrame_DOM.

Definition at line 1365 of file Preprocessor_DOM.php.

References array().

◆ getPDBK()

PPFrame_DOM::getPDBK (   $level = false)

Definition at line 1347 of file Preprocessor_DOM.php.

References title.

◆ getTitle()

PPFrame_DOM::getTitle ( )

Get a title of frame.

Returns
Title

Implements PPFrame.

Definition at line 1412 of file Preprocessor_DOM.php.

References $title.

◆ implode()

PPFrame_DOM::implode (   $sep)

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

Returns
string

Implements PPFrame.

Definition at line 1260 of file Preprocessor_DOM.php.

References $args, $s, array(), as, and expand().

◆ implodeWithFlags()

PPFrame_DOM::implodeWithFlags (   $sep,
  $flags 
)
Parameters
$sep
$flags
Returns
string

Implements PPFrame.

Definition at line 1230 of file Preprocessor_DOM.php.

References $args, $flags, $s, array(), as, and expand().

◆ isEmpty()

PPFrame_DOM::isEmpty ( )

Returns true if there are no arguments in this frame.

Returns
bool

Implements PPFrame.

Reimplemented in PPCustomFrame_DOM, and PPTemplateFrame_DOM.

Definition at line 1381 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 1403 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.

Returns
bool

Implements PPFrame.

Definition at line 1394 of file Preprocessor_DOM.php.

References $title, and Title\getPrefixedDBkey().

◆ 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.

Returns
PPTemplateFrame_DOM

Implements PPFrame.

Definition at line 962 of file Preprocessor_DOM.php.

References $args, $name, $title, $value, array(), as, expand(), and PPFrame\STRIP_COMMENTS.

◆ virtualBracketedImplode()

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

Virtual implode with brackets.

Returns
array

Implements PPFrame.

Definition at line 1318 of file Preprocessor_DOM.php.

References $args, $out, array(), and as.

Referenced by expand().

◆ virtualImplode()

PPFrame_DOM::virtualImplode (   $sep)

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

Returns
array

Implements PPFrame.

Definition at line 1290 of file Preprocessor_DOM.php.

References $args, $out, array(), and as.

Member Data Documentation

◆ $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 941 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 935 of file Preprocessor_DOM.php.

◆ $parser

Parser PPFrame_DOM::$parser

Definition at line 924 of file Preprocessor_DOM.php.

◆ $preprocessor

Preprocessor PPFrame_DOM::$preprocessor

◆ $title

Title PPFrame_DOM::$title

◆ $titleCache

PPFrame_DOM::$titleCache

Definition at line 929 of file Preprocessor_DOM.php.


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