MediaWiki  1.23.8
PPFrame_Hash Class Reference

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

Inheritance diagram for PPFrame_Hash:
Collaboration diagram for PPFrame_Hash:

Public Member Functions

 __construct ( $preprocessor)
 Construct a new preprocessor frame. More...
 
 __toString ()
 
 expand ( $root, $flags=0)
 
 getArgument ( $name)
 
 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 868 of file Preprocessor_Hash.php.

Constructor & Destructor Documentation

◆ __construct()

PPFrame_Hash::__construct (   $preprocessor)

Construct a new preprocessor frame.

Parameters
$preprocessorPreprocessor: the parent preprocessor

Definition at line 899 of file Preprocessor_Hash.php.

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

Member Function Documentation

◆ __toString()

PPFrame_Hash::__toString ( )

Reimplemented in PPCustomFrame_Hash, and PPTemplateFrame_Hash.

Definition at line 1251 of file Preprocessor_Hash.php.

◆ expand()

PPFrame_Hash::expand (   $root,
  $flags = 0 
)
Exceptions
MWException
Parameters
$root
$flagsint
Returns
string

Implements PPFrame.

Definition at line 955 of file Preprocessor_Hash.php.

References $flags, $out, $ret, $s, array(), PPFrame\NO_ARGS, PPFrame\NO_IGNORE, PPFrame\NO_TEMPLATES, PPFrame\RECOVER_COMMENTS, PPFrame\STRIP_COMMENTS, title, and virtualBracketedImplode().

Referenced by implode(), implodeWithFlags(), and newChild().

◆ getArgument()

PPFrame_Hash::getArgument (   $name)
Parameters
$name
Returns
bool

Implements PPFrame.

Reimplemented in PPTemplateFrame_Hash, and PPCustomFrame_Hash.

Definition at line 1301 of file Preprocessor_Hash.php.

◆ getArguments()

PPFrame_Hash::getArguments ( )
Returns
array

Implements PPFrame.

Reimplemented in PPCustomFrame_Hash, and PPTemplateFrame_Hash.

Definition at line 1270 of file Preprocessor_Hash.php.

References array().

◆ getNamedArguments()

PPFrame_Hash::getNamedArguments ( )
Returns
array

Implements PPFrame.

Reimplemented in PPTemplateFrame_Hash.

Definition at line 1284 of file Preprocessor_Hash.php.

References array().

◆ getNumberedArguments()

PPFrame_Hash::getNumberedArguments ( )
Returns
array

Implements PPFrame.

Reimplemented in PPTemplateFrame_Hash.

Definition at line 1277 of file Preprocessor_Hash.php.

References array().

◆ getPDBK()

PPFrame_Hash::getPDBK (   $level = false)
Parameters
$levelbool
Returns
array|bool|String

Definition at line 1259 of file Preprocessor_Hash.php.

References title.

◆ getTitle()

PPFrame_Hash::getTitle ( )

Get a title of frame.

Returns
Title

Implements PPFrame.

Definition at line 1330 of file Preprocessor_Hash.php.

References $title.

◆ implode()

PPFrame_Hash::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 1167 of file Preprocessor_Hash.php.

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

◆ implodeWithFlags()

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

Implements PPFrame.

Definition at line 1138 of file Preprocessor_Hash.php.

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

◆ isEmpty()

PPFrame_Hash::isEmpty ( )

Returns true if there are no arguments in this frame.

Returns
bool

Implements PPFrame.

Reimplemented in PPCustomFrame_Hash, and PPTemplateFrame_Hash.

Definition at line 1293 of file Preprocessor_Hash.php.

◆ isTemplate()

PPFrame_Hash::isTemplate ( )

Return true if the frame is a template frame.

Returns
bool

Implements PPFrame.

Reimplemented in PPTemplateFrame_Hash.

Definition at line 1321 of file Preprocessor_Hash.php.

◆ loopCheck()

PPFrame_Hash::loopCheck (   $title)

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

Parameters
$titleTitle
Returns
bool

Implements PPFrame.

Definition at line 1312 of file Preprocessor_Hash.php.

References $title, and Title\getPrefixedDBkey().

◆ newChild()

PPFrame_Hash::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
array | bool | \PPNode_Hash_Array$argsPPNode_Hash_Array|array
$titleTitle|bool
int$indexOffset
Exceptions
MWException
Returns
PPTemplateFrame_Hash

Implements PPFrame.

Definition at line 919 of file Preprocessor_Hash.php.

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

◆ virtualBracketedImplode()

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

Virtual implode with brackets.

Returns
PPNode_Hash_Array

Implements PPFrame.

Definition at line 1226 of file Preprocessor_Hash.php.

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

Referenced by expand().

◆ virtualImplode()

PPFrame_Hash::virtualImplode (   $sep)

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

Returns
PPNode_Hash_Array

Implements PPFrame.

Definition at line 1197 of file Preprocessor_Hash.php.

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

Member Data Documentation

◆ $depth

PPFrame_Hash::$depth

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

Definition at line 893 of file Preprocessor_Hash.php.

◆ $loopCheckHash

PPFrame_Hash::$loopCheckHash

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

Definition at line 887 of file Preprocessor_Hash.php.

◆ $parser

Parser PPFrame_Hash::$parser

Definition at line 872 of file Preprocessor_Hash.php.

◆ $preprocessor

Preprocessor PPFrame_Hash::$preprocessor

◆ $title

Title PPFrame_Hash::$title

◆ $titleCache

PPFrame_Hash::$titleCache

Definition at line 881 of file Preprocessor_Hash.php.


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