public function rewind() { if ($this->fileHandle) { rewind($this->fileHandle); } else { $this->openResource(); } $this->currentKey = 0; $this->next(); }