function StringInputStream::currentLine
Returns the current line that the tokenizer is at.
Overrides InputStream::currentLine
1 call to StringInputStream::currentLine()
- StringInputStream::getCurrentLine in vendor/
masterminds/ html5/ src/ HTML5/ Parser/ StringInputStream.php
File
-
vendor/
masterminds/ html5/ src/ HTML5/ Parser/ StringInputStream.php, line 123
Class
Namespace
Masterminds\HTML5\ParserCode
public function currentLine() {
if (empty($this->EOF) || 0 === $this->char) {
return 1;
}
// Add one to $this->char because we want the number for the next
// byte to be processed.
return substr_count($this->data, "\n", 0, min($this->char, $this->EOF)) + 1;
}