function Scanner::currentLine
Returns the current line that is being consumed.
Return value
int The current line number.
File
-
vendor/
masterminds/ html5/ src/ HTML5/ Parser/ Scanner.php, line 241
Class
- Scanner
- The scanner scans over a given data input to react appropriately to characters.
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;
}