public function set() { foreach ($this->_filters as $filter) { $filter->apply(); } $result = $this->_CI->Do_usergroup->get(); $this->_totalResults = count($result); //var_dump(count($result));die(); if ($result) { foreach ($result as $row) { $usergroup = new Usergroup(); $usergroup->setByData($row); $this->_usergroups[] = $usergroup; } } //var_dump(count($this->_usergroups));die(); if ((!empty($this->_startItem) || $this->_startItem == 0) && !empty($this->_offsetCount)) { for ($i = $this->_startItem; $i <= $this->_startItem + ($this->_offsetCount - 1); $i++) { if (isset($this->_usergroups[$i])) { $this->_items[] = $this->_usergroups[$i]; } else { break; } } } else { $this->_items = $this->_usergroups; } }