public function next() { $this->current = null; if (($restore = $this->statement->fetch(\PDO::FETCH_ASSOC)) !== false) { $this->current = clone $this->storable; $this->current->schema()->validate($restore); if (isset($restore['guid'])) { $this->current->guid($restore['guid']); $this->storage->register($this->current); } $this->current->restore($restore); } }