public function GetAll() { $pg = $this->_getPagination(); $db = $this->_openDb(); $allRows = $db->GetAllRows(); $count = sizeof($allRows); if ($count < $pg->Skip) { ApiBase::ReturnResult(null); } $result = array(); for ($i = $pg->Skip; $i < $count && $i < $pg->Skip + $pg->Top; $i++) { $result[] = $allRows[$i]; } ApiBase::ReturnSuccess($result); }