MediaWiki
1.34.0
|
An expansion frame, used as a context to expand the result of preprocessToObj() More...
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,... $args) | |
Implode with no flags specified This previously called implodeWithFlags but has now been inlined to reduce stack depth. More... | |
implodeWithFlags ( $sep, $flags,... $args) | |
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,... $args) | |
Virtual implode with brackets. More... | |
virtualImplode ( $sep,... $args) | |
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 |
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 | |
An expansion frame, used as a context to expand the result of preprocessToObj()
-file-suppress PhanUndeclaredMethod
Definition at line 29 of file PPFrame_DOM.php.
PPFrame_DOM::__construct | ( | $preprocessor | ) |
Construct a new preprocessor frame.
Preprocessor | $preprocessor | The parent preprocessor |
Definition at line 71 of file PPFrame_DOM.php.
References $preprocessor.
PPFrame_DOM::__toString | ( | ) |
Reimplemented in PPTemplateFrame_DOM, and PPCustomFrame_DOM.
Definition at line 521 of file PPFrame_DOM.php.
PPFrame_DOM::cachedExpand | ( | $key, | |
$root, | |||
$flags = 0 |
|||
) |
MWException |
string | int | $key | |
string | PPNode_DOM | DOMNode | DOMNodeList | $root | |
int | $flags |
Implements PPFrame.
Reimplemented in PPTemplateFrame_DOM.
Definition at line 150 of file PPFrame_DOM.php.
References expand().
PPFrame_DOM::expand | ( | $root, | |
$flags = 0 |
|||
) |
MWException |
string | PPNode_DOM | DOMNode | DOMNodeList | $root | |
int | $flags |
Implements PPFrame.
Definition at line 161 of file PPFrame_DOM.php.
References $s, $title, PPFrame\NO_ARGS, PPFrame\NO_IGNORE, PPFrame\NO_TAGS, PPFrame\NO_TEMPLATES, PPFrame\RECOVER_COMMENTS, PPFrame\STRIP_COMMENTS, and virtualBracketedImplode().
Referenced by PPTemplateFrame_DOM\cachedExpand(), cachedExpand(), implode(), implodeWithFlags(), and newChild().
PPFrame_DOM::getArgument | ( | $name | ) |
int | string | $name |
Implements PPFrame.
Reimplemented in PPTemplateFrame_DOM, and PPCustomFrame_DOM.
Definition at line 567 of file PPFrame_DOM.php.
PPFrame_DOM::getArguments | ( | ) |
Implements PPFrame.
Reimplemented in PPTemplateFrame_DOM, and PPCustomFrame_DOM.
Definition at line 536 of file PPFrame_DOM.php.
PPFrame_DOM::getNamedArguments | ( | ) |
Implements PPFrame.
Reimplemented in PPTemplateFrame_DOM.
Definition at line 550 of file PPFrame_DOM.php.
PPFrame_DOM::getNumberedArguments | ( | ) |
Implements PPFrame.
Reimplemented in PPTemplateFrame_DOM.
Definition at line 543 of file PPFrame_DOM.php.
PPFrame_DOM::getPDBK | ( | $level = false | ) |
Definition at line 525 of file PPFrame_DOM.php.
PPFrame_DOM::getTitle | ( | ) |
Get a title of frame.
Implements PPFrame.
Definition at line 595 of file PPFrame_DOM.php.
References $title.
PPFrame_DOM::getTTL | ( | ) |
Get the TTL.
Implements PPFrame.
Definition at line 633 of file PPFrame_DOM.php.
References $ttl.
PPFrame_DOM::implode | ( | $sep, | |
$args | |||
) |
PPFrame_DOM::implodeWithFlags | ( | $sep, | |
$flags, | |||
$args | |||
) |
PPFrame_DOM::isEmpty | ( | ) |
Returns true if there are no arguments in this frame.
Implements PPFrame.
Reimplemented in PPTemplateFrame_DOM, and PPCustomFrame_DOM.
Definition at line 559 of file PPFrame_DOM.php.
PPFrame_DOM::isTemplate | ( | ) |
Return true if the frame is a template frame.
Implements PPFrame.
Reimplemented in PPTemplateFrame_DOM.
Definition at line 586 of file PPFrame_DOM.php.
PPFrame_DOM::isVolatile | ( | ) |
Get the volatile flag.
Implements PPFrame.
Definition at line 613 of file PPFrame_DOM.php.
References $volatile.
Referenced by PPTemplateFrame_DOM\cachedExpand().
PPFrame_DOM::loopCheck | ( | $title | ) |
Returns true if the infinite loop check is OK, false if a loop is detected.
Title | $title |
Implements PPFrame.
Definition at line 577 of file PPFrame_DOM.php.
References $title, and Title\getPrefixedDBkey().
PPFrame_DOM::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.
bool | array | PPNode_DOM | $args | |
Title | bool | $title | |
int | $indexOffset |
Implements PPFrame.
Definition at line 90 of file PPFrame_DOM.php.
References $args, $title, expand(), PPFrame\STRIP_COMMENTS, wfEscapeWikiText(), and wfMessage().
PPFrame_DOM::setTTL | ( | $ttl | ) |
Set the TTL.
int | $ttl |
Implements PPFrame.
Reimplemented in PPTemplateFrame_DOM.
Definition at line 622 of file PPFrame_DOM.php.
References $ttl.
PPFrame_DOM::setVolatile | ( | $flag = true | ) |
Set the volatile flag.
bool | $flag |
Implements PPFrame.
Reimplemented in PPTemplateFrame_DOM.
Definition at line 604 of file PPFrame_DOM.php.
PPFrame_DOM::virtualBracketedImplode | ( | $start, | |
$sep, | |||
$end, | |||
$args | |||
) |
Virtual implode with brackets.
string | $start | |
string | $sep | |
string | $end | |
string|PPNode_DOM|DOMNode | ...$args |
Implements PPFrame.
Definition at line 497 of file PPFrame_DOM.php.
References $args.
Referenced by expand().
PPFrame_DOM::virtualImplode | ( | $sep, | |
$args | |||
) |
|
protected |
Definition at line 65 of file PPFrame_DOM.php.
PPFrame_DOM::$depth |
Recursion depth of this frame, top = 0 Note that this is NOT the same as expansion depth in expand()
Definition at line 57 of file PPFrame_DOM.php.
PPFrame_DOM::$loopCheckHash |
Hashtable listing templates which are disallowed for expansion in this frame, having been encountered previously in parent frames.
Definition at line 51 of file PPFrame_DOM.php.
Parser PPFrame_DOM::$parser |
Definition at line 39 of file PPFrame_DOM.php.
Preprocessor PPFrame_DOM::$preprocessor |
Definition at line 34 of file PPFrame_DOM.php.
Referenced by PPCustomFrame_DOM\__construct(), PPTemplateFrame_DOM\__construct(), and __construct().
Title PPFrame_DOM::$title |
Definition at line 44 of file PPFrame_DOM.php.
Referenced by PPTemplateFrame_DOM\__construct(), expand(), getTitle(), loopCheck(), and newChild().
PPFrame_DOM::$titleCache |
Definition at line 45 of file PPFrame_DOM.php.
|
private |
Definition at line 60 of file PPFrame_DOM.php.
Referenced by getTTL(), PPTemplateFrame_DOM\setTTL(), and setTTL().
|
private |
Definition at line 59 of file PPFrame_DOM.php.
Referenced by isVolatile().