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

Breadcrumb

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

function Tokenizer::text

This buffers the current token as character data.

Parameters

string $tok The current token.:

Return value

bool

3 calls to Tokenizer::text()
Tokenizer::characterData in vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php
Parse anything that looks like character data.
Tokenizer::rawText in vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php
Read text in RAW mode.
Tokenizer::rcdata in vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php
Read text in RCDATA mode.

File

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

Class

Tokenizer
The HTML5 tokenizer.

Namespace

Masterminds\HTML5\Parser

Code

protected function text($tok) {
    // This should never happen...
    if (false === $tok) {
        return false;
    }
    // NULL character
    if ("\x00" === $tok) {
        $this->parseError('Received null character.');
    }
    $this->buffer($tok);
    $this->scanner
        ->consume();
    return true;
}
RSS feed
Powered by Drupal