_result = $result; } public function getIterator() { return new \ArrayIterator($this->_result); } public function columnCount() { $row = reset($this->_result); if ($row) { return count($row); } else { return 0; } } public function fetchAll($fetchStyle = null) { return $this->_result; } public function fetch($fetchStyle = null) { $current = current($this->_result); next($this->_result); return $current; } public function fetchColumn($columnIndex = 0) { $current = current($this->_result); if ($current) { next($this->_result); return reset($current); } else { return false; } } public function rowCount() { return count($this->_result); } }