function 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::consumeData in vendor/
masterminds/ html5/ src/ HTML5/ Parser/ Tokenizer.php - Consume a character and make a move. HTML5 8.2.4.1.
- Tokenizer::eof in vendor/
masterminds/ html5/ src/ HTML5/ Parser/ Tokenizer.php - If the document is read, emit an EOF event.
File
-
vendor/
masterminds/ html5/ src/ HTML5/ Parser/ Tokenizer.php, line 1045
Class
- Tokenizer
- The HTML5 tokenizer.
Namespace
Masterminds\HTML5\ParserCode
protected function flushBuffer() {
if ('' === $this->text) {
return;
}
$this->events
->text($this->text);
$this->text = '';
}