Merge "ESLint ecmaVersion setting is not needed if env is es6"
[lhc/web/wiklou.git] / includes / parser / RemexStripTagHandler.php
1 <?php
2
3 use RemexHtml\Tokenizer\Attributes;
4 use RemexHtml\Tokenizer\TokenHandler;
5 use RemexHtml\Tokenizer\Tokenizer;
6
7 /**
8 * @internal
9 */
10 class RemexStripTagHandler implements TokenHandler {
11 private $text = '';
12 public function getResult() {
13 return $this->text;
14 }
15
16 function startDocument( Tokenizer $t, $fns, $fn ) {
17 // Do nothing.
18 }
19 function endDocument( $pos ) {
20 // Do nothing.
21 }
22 function error( $text, $pos ) {
23 // Do nothing.
24 }
25 function characters( $text, $start, $length, $sourceStart, $sourceLength ) {
26 $this->text .= substr( $text, $start, $length );
27 }
28 function startTag( $name, Attributes $attrs, $selfClose, $sourceStart, $sourceLength ) {
29 // Do nothing.
30 }
31 function endTag( $name, $sourceStart, $sourceLength ) {
32 // Do nothing.
33 }
34 function doctype( $name, $public, $system, $quirks, $sourceStart, $sourceLength ) {
35 // Do nothing.
36 }
37 function comment( $text, $sourceStart, $sourceLength ) {
38 // Do nothing.
39 }
40 }