You are here

public function Tokenizer::__construct in Zircon Profile 8

Same name in this branch
  1. 8 vendor/symfony/css-selector/Parser/Tokenizer/Tokenizer.php \Symfony\Component\CssSelector\Parser\Tokenizer\Tokenizer::__construct()
  2. 8 vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php \Masterminds\HTML5\Parser\Tokenizer::__construct()
Same name and namespace in other branches
  1. 8.0 vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php \Masterminds\HTML5\Parser\Tokenizer::__construct()

Create a new tokenizer.

Typically, parsing a document involves creating a new tokenizer, giving it a scanner (input) and an event handler (output), and then calling the Tokenizer::parse() method.`

Parameters

\Masterminds\HTML5\Parser\Scanner $scanner: A scanner initialized with an input stream.

\Masterminds\HTML5\Parser\EventHandler $eventHandler: An event handler, initialized and ready to receive events.

File

vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php, line 61

Class

Tokenizer
The HTML5 tokenizer.

Namespace

Masterminds\HTML5\Parser

Code

public function __construct($scanner, $eventHandler) {
  $this->scanner = $scanner;
  $this->events = $eventHandler;
}