/** * Restarts the iterator * * @return \r8\Iterator\Stream\Tokenize Returns a self reference */ public function rewind() { // Set the up the initial values for the internal state $this->buffer = ""; $this->key = null; $this->current = null; // Rewind the stream so it can be re-read $this->stream->rewind(); // Queue up the first string $this->next(); }
/** * Constructor... * * @param \r8\iface\Stream\In $input The input stream */ public function __construct(\r8\iface\Stream\In $input) { $this->tokens = @\token_get_all($input->readAll()); }