This is a class that wraps the DOMTraverser utility for use in the DOM Processor pipeline.
More...
|
| __construct (?DOMPostProcessor $domPP, bool $traverseWithTplInfo=false, bool $applyToAttributeEmbeddedHTML=false) |
|
| addHandler (?string $nodeName, callable $action) |
|
| run (Env $env, Node $root, array $options=[], bool $atTopLevel=false) |
| - Parameters
-
Env | $env | |
Element | DocumentFragment | $root | The root of the tree to process |
array | $options | |
bool | $atTopLevel | Is this processor invoked on the top level page? If false, this is being invoked in a sub-pipeline (ex: extensions) |
|
|
This is a class that wraps the DOMTraverser utility for use in the DOM Processor pipeline.
◆ addHandler()
Wikimedia\Parsoid\Wt2Html\DOMPPTraverser::addHandler |
( |
?string | $nodeName, |
|
|
callable | $action ) |
- Parameters
-
?string | $nodeName | An optional node name filter |
callable | $action | A callback, called on each node we traverse that matches nodeName. Proxies call to underlying DOMTraverser. See docs for DOMTraverser::addHandler |
◆ run()
Wikimedia\Parsoid\Wt2Html\DOMPPTraverser::run |
( |
Env | $env, |
|
|
Node | $root, |
|
|
array | $options = [], |
|
|
bool | $atTopLevel = false ) |
- Parameters
-
Env | $env | |
Element | DocumentFragment | $root | The root of the tree to process |
array | $options | |
bool | $atTopLevel | Is this processor invoked on the top level page? If false, this is being invoked in a sub-pipeline (ex: extensions) |
Implements Wikimedia\Parsoid\Wt2Html\Wt2HtmlDOMProcessor.
The documentation for this class was generated from the following file:
- src/Wt2Html/DOMPPTraverser.php