MediaWiki
1.27.4
|
Public Member Functions | |
cachedExpand ($key, $root, $flags=0) | |
Expand a document tree node, caching the result on its parent with the given key. More... | |
expand ($root, $flags=0) | |
Expand a document tree node. More... | |
getArgument ($name) | |
Get an argument to this frame by name. More... | |
getArguments () | |
Returns all arguments of this frame. More... | |
getNamedArguments () | |
Returns all named arguments of this frame. More... | |
getNumberedArguments () | |
Returns all numbered arguments of this frame. More... | |
getTitle () | |
Get a title of frame. More... | |
getTTL () | |
Get the TTL of the frame's output. More... | |
implode ($sep) | |
Implode with no flags specified. More... | |
implodeWithFlags ($sep, $flags) | |
Implode with flags for expand() More... | |
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 child 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... | |
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 | |
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... | |
Definition at line 159 of file Preprocessor.php.
PPFrame::cachedExpand | ( | $key, | |
$root, | |||
$flags = 0 |
|||
) |
Expand a document tree node, caching the result on its parent with the given key.
string | int | $key | |
string | PPNode | $root | |
int | $flags |
Implemented in PPTemplateFrame_DOM, PPTemplateFrame_Hash, PPFrame_DOM, and PPFrame_Hash.
PPFrame::expand | ( | $root, | |
$flags = 0 |
|||
) |
Expand a document tree node.
string | PPNode | $root | |
int | $flags |
Implemented in PPFrame_DOM, and PPFrame_Hash.
PPFrame::getArgument | ( | $name | ) |
Get an argument to this frame by name.
int | string | $name |
Implemented in PPCustomFrame_DOM, PPTemplateFrame_DOM, PPCustomFrame_Hash, PPTemplateFrame_Hash, PPFrame_DOM, and PPFrame_Hash.
PPFrame::getArguments | ( | ) |
Returns all arguments of this frame.
Implemented in PPCustomFrame_DOM, PPCustomFrame_Hash, PPTemplateFrame_DOM, PPTemplateFrame_Hash, PPFrame_DOM, and PPFrame_Hash.
PPFrame::getNamedArguments | ( | ) |
Returns all named arguments of this frame.
Implemented in PPTemplateFrame_DOM, PPTemplateFrame_Hash, PPFrame_DOM, and PPFrame_Hash.
PPFrame::getNumberedArguments | ( | ) |
Returns all numbered arguments of this frame.
Implemented in PPTemplateFrame_DOM, PPTemplateFrame_Hash, PPFrame_DOM, and PPFrame_Hash.
PPFrame::getTitle | ( | ) |
PPFrame::getTTL | ( | ) |
Get the TTL of the frame's output.
This is the maximum amount of time, in seconds, that this frame's output should be cached for. A value of null indicates that no maximum has been specified.
Note that this TTL only applies to caching frames as parts of pages. It is not relevant to caching the entire rendered output of a page.
Implemented in PPFrame_DOM, and PPFrame_Hash.
PPFrame::implode | ( | $sep | ) |
Implode with no flags specified.
string | $sep | |
string | PPNode | $args,... |
Implemented in PPFrame_DOM, and PPFrame_Hash.
PPFrame::implodeWithFlags | ( | $sep, | |
$flags | |||
) |
Implode with flags for expand()
string | $sep | |
int | $flags | |
string | PPNode | $args,... |
Implemented in PPFrame_DOM, and PPFrame_Hash.
PPFrame::isEmpty | ( | ) |
Returns true if there are no arguments in this frame.
Implemented in PPCustomFrame_DOM, PPCustomFrame_Hash, PPTemplateFrame_DOM, PPTemplateFrame_Hash, PPFrame_DOM, and PPFrame_Hash.
PPFrame::isTemplate | ( | ) |
Return true if the frame is a template frame.
Implemented in PPTemplateFrame_DOM, PPTemplateFrame_Hash, PPFrame_DOM, and PPFrame_Hash.
PPFrame::isVolatile | ( | ) |
Get the "volatile" flag.
Callers should avoid caching the result of an expansion if it has the volatile flag set.
Implemented in PPFrame_DOM, and PPFrame_Hash.
PPFrame::loopCheck | ( | $title | ) |
Returns true if the infinite loop check is OK, false if a loop is detected.
Title | $title |
Implemented in PPFrame_DOM, and PPFrame_Hash.
Create a child frame.
array | bool | $args | |
bool | Title | $title | |
int | $indexOffset | A number subtracted from the index attributes of the arguments |
Implemented in PPFrame_DOM, and PPFrame_Hash.
PPFrame::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.
int | $ttl |
Implemented in PPTemplateFrame_DOM, PPTemplateFrame_Hash, PPFrame_DOM, and PPFrame_Hash.
PPFrame::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.
bool | $flag |
Implemented in PPTemplateFrame_DOM, PPTemplateFrame_Hash, PPFrame_DOM, and PPFrame_Hash.
PPFrame::virtualBracketedImplode | ( | $start, | |
$sep, | |||
$end | |||
) |
Virtual implode with brackets.
string | $start | |
string | $sep | |
string | $end | |
string | PPNode | $args,... |
Implemented in PPFrame_DOM, and PPFrame_Hash.
PPFrame::virtualImplode | ( | $sep | ) |
Makes an object that, when expand()ed, will be the same as one obtained with implode()
string | $sep | |
string | PPNode | $args,... |
Implemented in PPFrame_DOM, and PPFrame_Hash.
const PPFrame::NO_ARGS = 1 |
Definition at line 160 of file Preprocessor.php.
Referenced by PPFrame_Hash\expand(), PPFrame_DOM\expand(), and Parser\getPreloadText().
const PPFrame::NO_IGNORE = 8 |
Definition at line 163 of file Preprocessor.php.
Referenced by PPFrame_Hash\expand(), and PPFrame_DOM\expand().
const PPFrame::NO_TAGS = 32 |
Definition at line 165 of file Preprocessor.php.
Referenced by PPFrame_Hash\expand(), and PPFrame_DOM\expand().
const PPFrame::NO_TEMPLATES = 2 |
Definition at line 161 of file Preprocessor.php.
Referenced by PPFrame_Hash\expand(), PPFrame_DOM\expand(), Parser\getPreloadText(), and Parser\replaceVariables().
const PPFrame::RECOVER_COMMENTS = 16 |
Definition at line 164 of file Preprocessor.php.
Referenced by PPFrame_Hash\expand(), and PPFrame_DOM\expand().
const PPFrame::RECOVER_ORIG = 59 |
Definition at line 167 of file Preprocessor.php.
Referenced by Parser\braceSubstitution(), Parser\extractSections(), and Parser\formatHeadings().
const PPFrame::STRIP_COMMENTS = 4 |
Definition at line 162 of file Preprocessor.php.
Referenced by Parser\braceSubstitution(), PPFrame_Hash\expand(), PPFrame_DOM\expand(), PPTemplateFrame_Hash\getNamedArgument(), PPTemplateFrame_DOM\getNamedArgument(), PPTemplateFrame_Hash\getNumberedArgument(), PPTemplateFrame_DOM\getNumberedArgument(), PPFrame_Hash\newChild(), PPFrame_DOM\newChild(), and CoreParserFunctions\tagObj().
const PPFrame::SUPPORTS_INDEX_OFFSET = 1 |
This constant exists when $indexOffset is supported in newChild()
Definition at line 170 of file Preprocessor.php.