Debian Codegraph @

vendor/wikimedia/parsoid/src/Wt2Html/Wt2HtmlDOMProcessor.php

raw
1 <?php
2 declare( strict_types = 1 );
3
4 namespace Wikimedia\Parsoid\Wt2Html;
5
6 use Wikimedia\Parsoid\Config\Env;
7 use Wikimedia\Parsoid\DOM\DocumentFragment;
8 use Wikimedia\Parsoid\DOM\Element;
9 use Wikimedia\Parsoid\DOM\Node;
10
11 /**
12 * wt2html DOM processor used to implement some DOM functionality
13 * (ex: DSR computation, template wrapping, etc.)
14 */
15 interface Wt2HtmlDOMProcessor {
16 /**
17 * @param Env $env
18 * @param Element|DocumentFragment $root The root of the tree to process
19 * @param array $options
20 * @param bool $atTopLevel Is this processor invoked on the top level page?
21 * If false, this is being invoked in a sub-pipeline (ex: extensions)
22 */
23 public function run(
24 Env $env, Node $root, array $options = [], bool $atTopLevel = false
25 ): void;
26 }