BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
PPFrame_Hash Class Reference
Inheritance diagram for PPFrame_Hash:
Collaboration diagram for PPFrame_Hash:

Public Member Functions

 __construct ($preprocessor)
 
 newChild ($args=false, $title=false, $indexOffset=0)
 
 cachedExpand ($key, $root, $flags=0)
 
 expand ($root, $flags=0)
 
 implodeWithFlags ($sep, $flags)
 
 implode ($sep)
 
 virtualImplode ($sep)
 
 virtualBracketedImplode ($start, $sep, $end)
 
 __toString ()
 
 getPDBK ($level=false)
 
 getArguments ()
 
 getNumberedArguments ()
 
 getNamedArguments ()
 
 isEmpty ()
 
 getArgument ($name)
 
 loopCheck ($title)
 
 isTemplate ()
 
 getTitle ()
 
 setVolatile ($flag=true)
 
 isVolatile ()
 
 setTTL ($ttl)
 
 getTTL ()
 

Public Attributes

 $parser
 
 $preprocessor
 
 $title
 
 $titleCache
 
 $loopCheckHash
 
 $depth
 
- Public Attributes inherited from PPFrame
const NO_ARGS = 1
 
const NO_TEMPLATES = 2
 
const STRIP_COMMENTS = 4
 
const NO_IGNORE = 8
 
const RECOVER_COMMENTS = 16
 
const NO_TAGS = 32
 
const RECOVER_ORIG = 59
 
const SUPPORTS_INDEX_OFFSET = 1
 

Protected Attributes

 $childExpansionCache
 

Detailed Description

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

Constructor & Destructor Documentation

PPFrame_Hash::__construct (   $preprocessor)

Construct a new preprocessor frame.

Parameters
Preprocessor$preprocessorThe parent preprocessor

Member Function Documentation

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

Implements PPFrame.

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

Implements PPFrame.

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

Implements PPFrame.

PPFrame_Hash::getArguments ( )
Returns
array

Implements PPFrame.

PPFrame_Hash::getNamedArguments ( )
Returns
array

Implements PPFrame.

PPFrame_Hash::getNumberedArguments ( )
Returns
array

Implements PPFrame.

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

Get a title of frame

Returns
Title

Implements PPFrame.

PPFrame_Hash::getTTL ( )

Get the TTL

Returns
int|null

Implements PPFrame.

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.

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

Implements PPFrame.

PPFrame_Hash::isEmpty ( )

Returns true if there are no arguments in this frame

Returns
bool

Implements PPFrame.

PPFrame_Hash::isTemplate ( )

Return true if the frame is a template frame

Returns
bool

Implements PPFrame.

PPFrame_Hash::isVolatile ( )

Get the volatile flag

Returns
bool

Implements PPFrame.

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.

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.

PPFrame_Hash::setTTL (   $ttl)

Set the TTL

Parameters
int$ttl

Implements PPFrame.

PPFrame_Hash::setVolatile (   $flag = true)

Set the volatile flag

Parameters
bool$flag

Implements PPFrame.

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.

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.

Member Data Documentation

PPFrame_Hash::$depth

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

PPFrame_Hash::$loopCheckHash

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


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