MediaWiki  1.27.2
PPTemplateFrame_DOM Class Reference

Expansion frame with template arguments. More...

Inheritance diagram for PPTemplateFrame_DOM:
Collaboration diagram for PPTemplateFrame_DOM:

Public Member Functions

 __construct ($preprocessor, $parent=false, $numberedArgs=[], $namedArgs=[], $title=false)
 
 __toString ()
 
 cachedExpand ($key, $root, $flags=0)
 
 getArgument ($name)
 
 getArguments ()
 Returns all arguments of this frame. More...
 
 getNamedArgument ($name)
 
 getNamedArguments ()
 Returns all named arguments of this frame. More...
 
 getNumberedArgument ($index)
 
 getNumberedArguments ()
 Returns all numbered arguments of this frame. More...
 
 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_DOM
 __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
 
PPFrame_DOM $parent
 
- Public Attributes inherited from PPFrame_DOM
 $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_DOM
array $childExpansionCache
 

Detailed Description

Expansion frame with template arguments.

Definition at line 1560 of file Preprocessor_DOM.php.

Constructor & Destructor Documentation

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

Definition at line 1578 of file Preprocessor_DOM.php.

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

Member Function Documentation

PPTemplateFrame_DOM::__toString ( )

Definition at line 1598 of file Preprocessor_DOM.php.

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

PPTemplateFrame_DOM::cachedExpand (   $key,
  $root,
  $flags = 0 
)
Exceptions
MWException
Parameters
string | int$key
string | PPNode_DOM | DOMDocument$root
int$flags
Returns
string

Implements PPFrame.

Definition at line 1622 of file Preprocessor_DOM.php.

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

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

Implements PPFrame.

Definition at line 1706 of file Preprocessor_DOM.php.

References getNamedArgument(), and getNumberedArgument().

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

PPTemplateFrame_DOM::getArguments ( )

Returns all arguments of this frame.

Returns
array

Implements PPFrame.

Definition at line 1642 of file Preprocessor_DOM.php.

References $key, as, and getArgument().

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

Definition at line 1690 of file Preprocessor_DOM.php.

References $name, and PPFrame\STRIP_COMMENTS.

Referenced by getArgument().

PPTemplateFrame_DOM::getNamedArguments ( )

Returns all named arguments of this frame.

Returns
array

Implements PPFrame.

Definition at line 1660 of file Preprocessor_DOM.php.

References $key, as, and getArgument().

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

Definition at line 1672 of file Preprocessor_DOM.php.

References PPFrame\STRIP_COMMENTS.

Referenced by getArgument().

PPTemplateFrame_DOM::getNumberedArguments ( )

Returns all numbered arguments of this frame.

Returns
array

Implements PPFrame.

Definition at line 1652 of file Preprocessor_DOM.php.

References $key, as, and getArgument().

PPTemplateFrame_DOM::isEmpty ( )

Returns true if there are no arguments in this frame.

Returns
bool

Implements PPFrame.

Definition at line 1638 of file Preprocessor_DOM.php.

PPTemplateFrame_DOM::isTemplate ( )

Return true if the frame is a template frame.

Returns
bool

Implements PPFrame.

Definition at line 1719 of file Preprocessor_DOM.php.

PPTemplateFrame_DOM::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 1728 of file Preprocessor_DOM.php.

References PPFrame_DOM\$ttl.

PPTemplateFrame_DOM::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 1723 of file Preprocessor_DOM.php.

Member Data Documentation

PPTemplateFrame_DOM::$namedArgs

Definition at line 1563 of file Preprocessor_DOM.php.

Referenced by __construct(), and __toString().

PPTemplateFrame_DOM::$namedExpansionCache

Definition at line 1569 of file Preprocessor_DOM.php.

PPTemplateFrame_DOM::$numberedArgs

Definition at line 1563 of file Preprocessor_DOM.php.

Referenced by __construct().

PPTemplateFrame_DOM::$numberedExpansionCache

Definition at line 1569 of file Preprocessor_DOM.php.

PPFrame_DOM PPTemplateFrame_DOM::$parent

Definition at line 1568 of file Preprocessor_DOM.php.

Referenced by __construct().


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