_total_rows = count($result); } public function __destruct() { // Cached results do not use resources } public function cached() { return $this; } #[\ReturnTypeWillChange] public function seek($offset) { if ($this->offsetExists($offset)) { $this->_current_row = $offset; return TRUE; } else { return FALSE; } } #[\ReturnTypeWillChange] public function current() { // Return an array of the row return $this->valid() ? $this->_result[$this->_current_row] : NULL; } } // End Database_Result_Cached