You are here

class CssInputStream in QueryPath 6

Same name and namespace in other branches
  1. 7.3 QueryPath/CssParser.php \CssInputStream
  2. 7.2 QueryPath/CssParser.php \CssInputStream

Hierarchy

Expanded class hierarchy of CssInputStream

File

QueryPath/CssParser.php, line 722

View source
class CssInputStream {
  protected $stream = NULL;
  public $position = 0;
  function __construct($string) {
    $this->stream = str_split($string);
  }
  function peek() {
    return $this->stream[0];
  }
  function consume() {
    $ret = array_shift($this->stream);
    if (!empty($ret)) {
      $this->position++;
    }
    return $ret;
  }
  function isEmpty() {
    return count($this->stream) == 0;
  }

}

Members