public function reset() { if (isset($this->_lastScrollId)) { $this->query->createCommand($this->db)->clearScroll(['scroll_id' => $this->_lastScrollId]); } $this->_batch = null; $this->_value = null; $this->_key = null; $this->_lastScrollId = null; }