MediaWiki  1.27.2
PPTemplateFrame_Hash Class Reference

Expansion frame with template arguments. More...

Inheritance diagram for PPTemplateFrame_Hash:
Collaboration diagram for PPTemplateFrame_Hash:

Public Member Functions

 __construct ($preprocessor, $parent=false, $numberedArgs=[], $namedArgs=[], $title=false)
 
 __toString ()
 
 cachedExpand ($key, $root, $flags=0)
 
 getArgument ($name)
 
 getArguments ()
 
 getNamedArgument ($name)
 
 getNamedArguments ()
 
 getNumberedArgument ($index)
 
 getNumberedArguments ()
 
 isEmpty ()
 Returns true if there are no arguments in this frame. More...
 
 isTemplate ()
 Return true if the frame is a template frame. More...
 
 setTTL ($ttl)
 Set the TTL of the output of this frame and all of its ancestors. More...
 
 setVolatile ($flag=true)
 Set the "volatile" flag. More...
 
- Public Member Functions inherited from PPFrame_Hash
 __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

 $namedArgs
 
 $namedExpansionCache
 
 $numberedArgs
 
 $numberedExpansionCache
 
 $parent
 
- Public Attributes inherited from PPFrame_Hash
 $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...
 

Additional Inherited Members

- Protected Attributes inherited from PPFrame_Hash
array $childExpansionCache
 

Detailed Description

Expansion frame with template arguments.

Definition at line 1453 of file Preprocessor_Hash.php.

Constructor & Destructor Documentation

PPTemplateFrame_Hash::__construct (   $preprocessor,
  $parent = false,
  $numberedArgs = [],
  $namedArgs = [],
  $title = false 
)
Parameters
Preprocessor$preprocessor
bool | PPFrame$parent
array$numberedArgs
array$namedArgs
bool | Title$title

Definition at line 1466 of file Preprocessor_Hash.php.

References $namedArgs, $numberedArgs, $parent, PPFrame_Hash\$preprocessor, PPFrame_Hash\$title, Title\getPrefixedDBkey(), and title.

Member Function Documentation

PPTemplateFrame_Hash::__toString ( )

Definition at line 1486 of file Preprocessor_Hash.php.

References $args, $name, $namedArgs, $s, $value, and as.

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

Implements PPFrame.

Definition at line 1510 of file Preprocessor_Hash.php.

References $flags, $key, $retval, PPFrame_Hash\expand(), and PPFrame_Hash\isVolatile().

PPTemplateFrame_Hash::getArgument (   $name)
Parameters
int | string$name
Returns
string|bool

Implements PPFrame.

Definition at line 1603 of file Preprocessor_Hash.php.

References $name, getNamedArgument(), and getNumberedArgument().

Referenced by getArguments(), getNamedArguments(), and getNumberedArguments().

PPTemplateFrame_Hash::getArguments ( )
Returns
array

Implements PPFrame.

Definition at line 1533 of file Preprocessor_Hash.php.

References $key, as, and getArgument().

PPTemplateFrame_Hash::getNamedArgument (   $name)
Parameters
string$name
Returns
string|bool

Definition at line 1587 of file Preprocessor_Hash.php.

References $name, and PPFrame\STRIP_COMMENTS.

Referenced by getArgument().

PPTemplateFrame_Hash::getNamedArguments ( )
Returns
array

Implements PPFrame.

Definition at line 1557 of file Preprocessor_Hash.php.

References $key, as, and getArgument().

PPTemplateFrame_Hash::getNumberedArgument (   $index)
Parameters
int$index
Returns
string|bool

Definition at line 1569 of file Preprocessor_Hash.php.

References PPFrame\STRIP_COMMENTS.

Referenced by getArgument().

PPTemplateFrame_Hash::getNumberedArguments ( )
Returns
array

Implements PPFrame.

Definition at line 1546 of file Preprocessor_Hash.php.

References $key, as, and getArgument().

PPTemplateFrame_Hash::isEmpty ( )

Returns true if there are no arguments in this frame.

Returns
bool

Implements PPFrame.

Definition at line 1526 of file Preprocessor_Hash.php.

PPTemplateFrame_Hash::isTemplate ( )

Return true if the frame is a template frame.

Returns
bool

Implements PPFrame.

Definition at line 1616 of file Preprocessor_Hash.php.

PPTemplateFrame_Hash::setTTL (   $ttl)

Set the TTL of the output of this frame and all of its ancestors.

Has no effect if the new TTL is greater than the one already set. Note that it is the caller's responsibility to change the cache expiry of the page as a whole, if such behavior is desired.

See also
self::getTTL()
Parameters
int$ttl

Implements PPFrame.

Definition at line 1625 of file Preprocessor_Hash.php.

References PPFrame_Hash\$ttl.

PPTemplateFrame_Hash::setVolatile (   $flag = true)

Set the "volatile" flag.

Note that this is somewhat of a "hack" in order to make extensions with side effects (such as Cite) work with the PHP parser. New extensions should be written in a way that they do not need this function, because other parsers (such as Parsoid) are not guaranteed to respect it, and it may be removed in the future.

Parameters
bool$flag

Implements PPFrame.

Definition at line 1620 of file Preprocessor_Hash.php.

Member Data Documentation

PPTemplateFrame_Hash::$namedArgs

Definition at line 1456 of file Preprocessor_Hash.php.

Referenced by __construct(), and __toString().

PPTemplateFrame_Hash::$namedExpansionCache

Definition at line 1457 of file Preprocessor_Hash.php.

PPTemplateFrame_Hash::$numberedArgs

Definition at line 1456 of file Preprocessor_Hash.php.

Referenced by __construct().

PPTemplateFrame_Hash::$numberedExpansionCache

Definition at line 1457 of file Preprocessor_Hash.php.

PPTemplateFrame_Hash::$parent

Definition at line 1456 of file Preprocessor_Hash.php.

Referenced by __construct().


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