public function StringInputStream::currentLine in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/masterminds/html5/src/HTML5/Parser/StringInputStream.php \Masterminds\HTML5\Parser\StringInputStream::currentLine()
Returns the current line that the tokenizer is at.
Overrides InputStream::currentLine
File
- vendor/
masterminds/ html5/ src/ HTML5/ Parser/ StringInputStream.php, line 112
Class
Namespace
Masterminds\HTML5\ParserCode
public function currentLine() {
if (empty($this->EOF) || $this->char == 0) {
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;
}