Token transformation manager.
More...
|
| $prevStage |
|
| $pipelineId = -1 |
|
| $env = null |
|
| $atTopLevel |
|
| $frame |
|
Token transformation manager.
Individual transformations implement the TokenHandler interface. The parser pipeline registers individual transformers.
See https://www.mediawiki.org/wiki/Parsoid/Token_stream_transformations for more documentation. This abstract class could eventually be eliminated and the various token transforms just extend PipelineStage directly.
◆ __construct()
Wikimedia\Parsoid\Wt2Html\TokenTransformManager::__construct |
( |
Env | $env, |
|
|
array | $options, |
|
|
string | $stageId, |
|
|
?PipelineStage | $prevStage = null ) |
- Parameters
-
Env | $env | |
array | $options | |
string | $stageId | |
?PipelineStage | $prevStage | |
◆ addTransformer()
Wikimedia\Parsoid\Wt2Html\TokenTransformManager::addTransformer |
( |
TokenHandler | $t | ) |
|
◆ getFrame()
Wikimedia\Parsoid\Wt2Html\TokenTransformManager::getFrame |
( |
| ) |
|
◆ getOptions()
Wikimedia\Parsoid\Wt2Html\TokenTransformManager::getOptions |
( |
| ) |
|
◆ process()
Wikimedia\Parsoid\Wt2Html\TokenTransformManager::process |
( |
| $tokens, |
|
|
?array | $opts = null ) |
See PipelineStage::process docs as well.
This doc block refines the generic arg types to be specific to this pipeline stage.
Process a chunk of tokens.
- Parameters
-
array | $tokens | Array of tokens to process |
?array | $opts | |
- Returns
- array Returns the array of processed tokens
Reimplemented from Wikimedia\Parsoid\Wt2Html\PipelineStage.
◆ processChunk()
Wikimedia\Parsoid\Wt2Html\TokenTransformManager::processChunk |
( |
array | $tokens | ) |
|
Push the tokens through all the registered transformers.
◆ resetState()
Wikimedia\Parsoid\Wt2Html\TokenTransformManager::resetState |
( |
array | $opts | ) |
|
◆ setPipelineId()
Wikimedia\Parsoid\Wt2Html\TokenTransformManager::setPipelineId |
( |
int | $id | ) |
|
◆ shuttleTokensToEndOfStage()
Wikimedia\Parsoid\Wt2Html\TokenTransformManager::shuttleTokensToEndOfStage |
( |
array | $toks | ) |
|
The documentation for this class was generated from the following file:
- src/Wt2Html/TokenTransformManager.php