Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Tokenizer.php

function Tokenizer::__construct

Same name in this branch
  1. 11.1.x vendor/symfony/css-selector/Parser/Tokenizer/Tokenizer.php \Symfony\Component\CssSelector\Parser\Tokenizer\Tokenizer::__construct()
  2. 11.1.x vendor/squizlabs/php_codesniffer/src/Tokenizers/Tokenizer.php \PHP_CodeSniffer\Tokenizers\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

Scanner $scanner A scanner initialized with an input stream.:

EventHandler $eventHandler An event handler, initialized and ready to receive events.:

string $mode:

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, $mode = self::CONFORMANT_HTML) {
    $this->scanner = $scanner;
    $this->events = $eventHandler;
    $this->mode = $mode;
}
RSS feed
Powered by Drupal