You are here

public function StringInputStream::currentLine in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 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

StringInputStream

Namespace

Masterminds\HTML5\Parser

Code

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;
}