MediaWiki  1.28.0
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 ()
 
 cachedExpand ($key, $root, $flags=0)
 
 expand ($root, $flags=0)
 
 getArgument ($name)
 
 getArguments ()
 
 getNamedArguments ()
 
 getNumberedArguments ()
 
 getPDBK ($level=false)
 
 getTitle ()
 Get a title of frame. More...
 
 getTTL ()
 Get the TTL. 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...
 
 isVolatile ()
 Get the volatile flag. 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...
 
 setTTL ($ttl)
 Set the TTL. More...
 
 setVolatile ($flag=true)
 Set the volatile flag. 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_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() More...
 

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 787 of file Preprocessor_Hash.php.

Constructor & Destructor Documentation

PPFrame_Hash::__construct (   $preprocessor)

Construct a new preprocessor frame.

Parameters
Preprocessor$preprocessorThe parent preprocessor

Definition at line 830 of file Preprocessor_Hash.php.

References $preprocessor, false, and title.

Member Function Documentation

PPFrame_Hash::__toString ( )

Definition at line 1260 of file Preprocessor_Hash.php.

PPFrame_Hash::cachedExpand (   $key,
  $root,
  $flags = 0 
)
Exceptions
MWException
Parameters
string | int$key
string | PPNode$root
int$flags
Returns
string

Implements PPFrame.

Definition at line 901 of file Preprocessor_Hash.php.

References $flags, and expand().

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

Implements PPFrame.

Definition at line 1310 of file Preprocessor_Hash.php.

PPFrame_Hash::getArguments ( )
Returns
array

Implements PPFrame.

Definition at line 1279 of file Preprocessor_Hash.php.

PPFrame_Hash::getNamedArguments ( )
Returns
array

Implements PPFrame.

Definition at line 1293 of file Preprocessor_Hash.php.

PPFrame_Hash::getNumberedArguments ( )
Returns
array

Implements PPFrame.

Definition at line 1286 of file Preprocessor_Hash.php.

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

Definition at line 1268 of file Preprocessor_Hash.php.

References title.

PPFrame_Hash::getTitle ( )

Get a title of frame.

Returns
Title

Implements PPFrame.

Definition at line 1339 of file Preprocessor_Hash.php.

References $title.

PPFrame_Hash::getTTL ( )

Get the TTL.

Returns
int|null

Implements PPFrame.

Definition at line 1377 of file Preprocessor_Hash.php.

References $ttl.

PPFrame_Hash::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$args,...
Returns
string

Implements PPFrame.

Definition at line 1170 of file Preprocessor_Hash.php.

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

PPFrame_Hash::implodeWithFlags (   $sep,
  $flags 
)
Parameters
string$sep
int$flags
string | PPNode$args,...
Returns
string

Implements PPFrame.

Definition at line 1139 of file Preprocessor_Hash.php.

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

PPFrame_Hash::isEmpty ( )

Returns true if there are no arguments in this frame.

Returns
bool

Implements PPFrame.

Definition at line 1302 of file Preprocessor_Hash.php.

PPFrame_Hash::isTemplate ( )

Return true if the frame is a template frame.

Returns
bool

Implements PPFrame.

Definition at line 1330 of file Preprocessor_Hash.php.

PPFrame_Hash::isVolatile ( )

Get the volatile flag.

Returns
bool

Implements PPFrame.

Definition at line 1357 of file Preprocessor_Hash.php.

References $volatile.

Referenced by PPTemplateFrame_Hash\cachedExpand().

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

References Title\getPrefixedDBkey().

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$args
Title | bool$title
int$indexOffset
Exceptions
MWException
Returns
PPTemplateFrame_Hash

Implements PPFrame.

Definition at line 850 of file Preprocessor_Hash.php.

References $args, $name, $title, as, expand(), PPFrame\STRIP_COMMENTS, text, title, wfEscapeWikiText(), and wfMessage().

PPFrame_Hash::setTTL (   $ttl)

Set the TTL.

Parameters
int$ttl

Implements PPFrame.

Definition at line 1366 of file Preprocessor_Hash.php.

References $ttl.

PPFrame_Hash::setVolatile (   $flag = true)

Set the volatile flag.

Parameters
bool$flag

Implements PPFrame.

Definition at line 1348 of file Preprocessor_Hash.php.

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

Virtual implode with brackets.

Parameters
string$start
string$sep
string$end
string | PPNode$args,...
Returns
PPNode_Hash_Array

Implements PPFrame.

Definition at line 1235 of file Preprocessor_Hash.php.

References $args, $out, and as.

Referenced by expand().

PPFrame_Hash::virtualImplode (   $sep)

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

Parameters
string$sep
string | PPNode$args,...
Returns
PPNode_Hash_Array

Implements PPFrame.

Definition at line 1202 of file Preprocessor_Hash.php.

References $args, $out, and as.

Member Data Documentation

array PPFrame_Hash::$childExpansionCache
protected

Definition at line 824 of file Preprocessor_Hash.php.

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 816 of file Preprocessor_Hash.php.

PPFrame_Hash::$loopCheckHash

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

Definition at line 810 of file Preprocessor_Hash.php.

Parser PPFrame_Hash::$parser

Definition at line 793 of file Preprocessor_Hash.php.

Preprocessor PPFrame_Hash::$preprocessor
Title PPFrame_Hash::$title

Definition at line 803 of file Preprocessor_Hash.php.

Referenced by PPTemplateFrame_Hash\__construct(), getTitle(), and newChild().

PPFrame_Hash::$titleCache

Definition at line 804 of file Preprocessor_Hash.php.

PPFrame_Hash::$ttl = null
private

Definition at line 819 of file Preprocessor_Hash.php.

Referenced by getTTL(), setTTL(), and PPTemplateFrame_Hash\setTTL().

PPFrame_Hash::$volatile = false
private

Definition at line 818 of file Preprocessor_Hash.php.

Referenced by isVolatile().


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