Parsoid
A bidirectional parser between wikitext and HTML5
|
A frame represents a template expansion scope including parameters passed to the template (args). More...
Public Member Functions | |
__construct (Title $title, Env $env, array $args, string $srcText, ?Frame $parentFrame=null) | |
getEnv () | |
getTitle () | |
getArgs () | |
getSrcText () | |
newChild (Title $title, array $args, string $srcText) | |
Create a new child frame. | |
expand (array $chunk, array $options) | |
Expand / convert a thunk (a chunk of tokens not yet fully expanded). | |
loopAndDepthCheck (Title $title, int $maxDepth, bool $ignoreLoop) | |
Check if expanding a template would lead to a loop, or would exceed the maximum expansion depth. | |
expandTemplateArg (Token $tplArgToken) | |
A frame represents a template expansion scope including parameters passed to the template (args).
It provides a generic 'expand' method which expands / converts individual parameter values in its scope. It also provides methods to check if another expansion would lead to loops or exceed the maximum expansion depth.
Wikimedia\Parsoid\Wt2Html\Frame::__construct | ( | Title | $title, |
Env | $env, | ||
array | $args, | ||
string | $srcText, | ||
?Frame | $parentFrame = null ) |
Title | $title | |
Env | $env | |
KV[] | $args | |
string | $srcText | |
?Frame | $parentFrame |
Wikimedia\Parsoid\Wt2Html\Frame::expand | ( | array | $chunk, |
array | $options ) |
Expand / convert a thunk (a chunk of tokens not yet fully expanded).
array<Token|string> | $chunk | |
array | $options |
Wikimedia\Parsoid\Wt2Html\Frame::expandTemplateArg | ( | Token | $tplArgToken | ) |
Token | $tplArgToken |
Wikimedia\Parsoid\Wt2Html\Frame::loopAndDepthCheck | ( | Title | $title, |
int | $maxDepth, | ||
bool | $ignoreLoop ) |
Check if expanding a template would lead to a loop, or would exceed the maximum expansion depth.
Title | $title | |
int | $maxDepth | |
bool | $ignoreLoop |
Wikimedia\Parsoid\Wt2Html\Frame::newChild | ( | Title | $title, |
array | $args, | ||
string | $srcText ) |
Create a new child frame.
Title | $title | |
KV[] | $args | |
string | $srcText |