public function rewind()
    {
        if ($this->index < 0) {
            $this->row = $this->statement->fetch();
            $this->index = 0;
        } else {
            throw new \Exception('DataReader cannot rewind. It is a forward-only reader.');
        }
    }
public function rewind()
    {
        if ($this->index < 0) {
            $this->row = $this->statement->fetch();
            $this->index = 0;
        } else {
            throw new \Exception('DataReader cannot rewind. It is a forward-only reader.');
        }
    }
public function rewind ( ) { if ( $ this -> index < 0 ) { $ this -> row = $ this -> statement -> fetch ( ) ; $ this -> index = 0 ; } else { throw new \ Exception ( 'DataReader cannot rewind. It is a forward-only reader.' ) ; } }
Resets the iterator to the initial state.
This method is required by the interface Iterator.

@throws \Exception if this method is invoked twice
Resets the iterator to the initial state . This method is required by the interface Iterator .