private function startPaginator(HttpService $httpService, array $rows) { $this->paginator->setPage($httpService->getPaginatorPage()); if (is_null($this->paginator->getItemCount())) { $this->paginator->setItemCount(count($rows)); } return array_slice($rows, $this->paginator->offset, $this->paginator->itemsPerPage); }