You are here

protected function Tokenizer::flushBuffer in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php \Masterminds\HTML5\Parser\Tokenizer::flushBuffer()

Send a TEXT event with the contents of the text buffer.

This emits an EventHandler::text() event with the current contents of the temporary text buffer. (The buffer is used to group as much PCDATA as we can instead of emitting lots and lots of TEXT events.)

3 calls to Tokenizer::flushBuffer()
Tokenizer::bogusComment in vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php
Consume malformed markup as if it were a comment. 8.2.4.44
Tokenizer::eof in vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php
If the document is read, emit an EOF event.
Tokenizer::tagOpen in vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php
Emit a tagStart event on encountering a tag.

File

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

Class

Tokenizer
The HTML5 tokenizer.

Namespace

Masterminds\HTML5\Parser

Code

protected function flushBuffer() {
  if ($this->text === '') {
    return;
  }
  $this->events
    ->text($this->text);
  $this->text = '';
}