Parsoid
A bidirectional parser between wikitext and HTML5
|
Public Member Functions | |
__construct (TokenTransformManager $manager, array $options, string $traceType, TokenHandler $handler) | |
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. | |
onAny ( $token) | |
resetState (array $options) | |
Resets any internal state for this token handler. | |
setPipelineId (int $id) | |
isDisabled () | |
Is this transformer disabled? | |
Public Member Functions inherited from Wikimedia\Parsoid\Wt2Html\TT\TokenHandler | |
__construct (TokenTransformManager $manager, array $options) | |
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 | |
Wikimedia\Parsoid\Wt2Html\TT\TraceProxy::isDisabled | ( | ) |
Is this transformer disabled?
Reimplemented from Wikimedia\Parsoid\Wt2Html\TT\TokenHandler.
Wikimedia\Parsoid\Wt2Html\TT\TraceProxy::onAny | ( | $token | ) |
string | Token | $token |
Reimplemented from Wikimedia\Parsoid\Wt2Html\TT\TokenHandler.
Wikimedia\Parsoid\Wt2Html\TT\TraceProxy::onEnd | ( | EOFTk | $token | ) |
This handler is called for EOF tokens only.
EOFTk | $token | EOF token to be processed |
Reimplemented from Wikimedia\Parsoid\Wt2Html\TT\TokenHandler.
Wikimedia\Parsoid\Wt2Html\TT\TraceProxy::onNewline | ( | NlTk | $token | ) |
This handler is called for newline tokens only.
NlTk | $token | Newline token to be processed |
Reimplemented from Wikimedia\Parsoid\Wt2Html\TT\TokenHandler.
Wikimedia\Parsoid\Wt2Html\TT\TraceProxy::onTag | ( | Token | $token | ) |
This handler is called for tokens that are not EOFTk or NLTk tokens.
The handler may choose to process only specific kinds of tokens. For example, a list handler may only process 'listitem' TagTk tokens.
Token | $token | Token to be processed |
Reimplemented from Wikimedia\Parsoid\Wt2Html\TT\TokenHandler.
Wikimedia\Parsoid\Wt2Html\TT\TraceProxy::resetState | ( | array | $options | ) |
Resets any internal state for this token handler.
array | $options |
Reimplemented from Wikimedia\Parsoid\Wt2Html\TT\TokenHandler.
Wikimedia\Parsoid\Wt2Html\TT\TraceProxy::setPipelineId | ( | int | $id | ) |
Reimplemented from Wikimedia\Parsoid\Wt2Html\TT\TokenHandler.