|
Parsoid
A bidirectional parser between wikitext and HTML5
|
A frame represents a template expansion scope including parameters passed to the template (args). More...
Inheritance diagram for Wikimedia\Parsoid\Wt2Html\Frame:Public Member Functions | |
| __construct (Title $title, Env $env, array $args, Source $source, ?Frame $parentFrame=null) | |
| getEnv () | |
| getTitle () | |
| getArgs () | |
| getSource () | |
| newChild (Title $title, array $args, string|Source $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, | ||
| Source | $source, | ||
| ?Frame | $parentFrame = null ) |
| Title | $title | |
| Env | $env | |
| KV[] | $args | |
| Source | $source | |
| ?Frame | $parentFrame |
| Wikimedia\Parsoid\Wt2Html\Frame::expand | ( | array | $chunk, |
| array | $options ) |
Expand / convert a thunk (a chunk of tokens not yet fully expanded).
| list<Token|string> | $chunk |
| array{expandTemplates:bool,inTemplate:bool,attrExpansion?:bool,srcOffsets?:?SourceRange} | $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 |
Create a new child frame.
| Title | $title | |
| KV[] | $args | |
| string | Source | $srcText |