offset = $offset; $this->limit = $limit; return $this; } function getOffset() { return $this->offset; } function getLimit() { return $this->limit; } function sort($params) { $this->sort_params = $params; return $this; } function getArray() { $array = array(); foreach($this as $record) $array[] = $record; return $array; } //ArrayAccess interface function offsetExists($offset) { return !is_null($this->offsetGet($offset)); } function offsetGet($offset) { if(is_numeric($offset)) return $this->at((int)$offset); } function offsetSet($offset, $value){} function offsetUnset($offset){} //end } ?>