���ѧۧݧ�ӧ�� �ާ֧ߧ֧էا֧� - ���֧էѧܧ�ڧ��ӧѧ�� - /home/rickpfrv/wiki.craftaro.com/vendor/wikimedia/remex-html/src/Tokenizer/TestTokenHandler.php
���ѧ٧ѧ�
<?php namespace Wikimedia\RemexHtml\Tokenizer; /** * A TokenHandler which collects events from the Tokenizer and generates an * array compatible with the html5lib tokenizer tests. */ class TestTokenHandler implements TokenHandler { private $tokens = []; public function getTokens() { return $this->tokens; } public function startDocument( Tokenizer $tokenizer, $fns, $fn ) { } public function endDocument( $pos ) { } public function error( $text, $pos ) { $this->tokens[] = 'ParseError'; } public function characters( $text, $start, $length, $sourceStart, $sourceLength ) { $this->tokens[] = [ 'Character', substr( $text, $start, $length ) ]; } public function startTag( $name, Attributes $attrs, $selfClose, $sourceStart, $sourceLength ) { $attrArray = $attrs->getValues(); if ( $selfClose ) { $this->tokens[] = [ 'StartTag', $name, $attrArray, $selfClose ]; } else { $this->tokens[] = [ 'StartTag', $name, $attrArray ]; } } public function endTag( $name, $sourceStart, $sourceLength ) { $this->tokens[] = [ 'EndTag', $name ]; } public function doctype( $name, $public, $system, $quirks, $sourceStart, $sourceLength ) { $this->tokens[] = [ 'DOCTYPE', $name, $public, $system, !$quirks ]; } public function comment( $text, $sourceStart, $sourceLength ) { $this->tokens[] = [ 'Comment', $text ]; } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | ���֧ߧ֧�ѧ�ڧ� ����ѧߧڧ��: 0.09 |
proxy
|
phpinfo
|
���ѧ����ۧܧ�