Parsoid
A bidirectional parser between wikitext and HTML5
|
Generic attribute expansion handler. More...
Public Member Functions | |
__construct (TokenTransformManager $manager, array $options) | |
expandFirstAttribute (Token $token) | |
Expand the first attribute of the token – usually needed to support tempate tokens where the template target itself is a complex attribute. | |
onAny ( $token) | |
Token handler. | |
Public Member Functions inherited from Wikimedia\Parsoid\Wt2Html\TT\TokenHandler | |
setPipelineId (int $id) | |
resetState (array $options) | |
Resets any internal state for this token handler. | |
isDisabled () | |
Is this transformer disabled? | |
onEnd (EOFTk $token) | |
This handler is called for EOF tokens only. | |
onNewline (NlTk $token) | |
This handler is called for newline tokens only. | |
onTag (Token $token) | |
This handler is called for tokens that are not EOFTk or NLTk tokens. | |
process ( $tokens) | |
Push an input array of tokens through the transformer and return the transformed tokens. | |
Additional Inherited Members | |
Protected Attributes inherited from Wikimedia\Parsoid\Wt2Html\TT\TokenHandler | |
$env | |
$manager | |
$pipelineId | |
$options | |
bool | $disabled = false |
This is set if the token handler is disabled for the entire pipeline. | |
bool | $onAnyEnabled = true |
This is set/reset by the token handlers at various points in the token stream based on what is encountered. | |
$atTopLevel = false | |
Generic attribute expansion handler.
Wikimedia\Parsoid\Wt2Html\TT\AttributeExpander::__construct | ( | TokenTransformManager | $manager, |
array | $options ) |
TokenTransformManager | $manager | |
array | $options |
|
Reimplemented from Wikimedia\Parsoid\Wt2Html\TT\TokenHandler.
Wikimedia\Parsoid\Wt2Html\TT\AttributeExpander::expandFirstAttribute | ( | Token | $token | ) |
Expand the first attribute of the token – usually needed to support tempate tokens where the template target itself is a complex attribute.
Token | $token | Token whose first attribute is being expanded. |
Wikimedia\Parsoid\Wt2Html\TT\AttributeExpander::onAny | ( | $token | ) |
Token handler.
For tokens that might have complex attributes, this handler processes / expands them. (Ex: Templated styles)
Token | string | $token | Token whose attrs being expanded. |
Reimplemented from Wikimedia\Parsoid\Wt2Html\TT\TokenHandler.