public function paginate($size, $page, $cacheOptions = null) { $this->paginator->items = $this->limit($size, ($page - 1) * $size)->executeEx($totalRows, $cacheOptions); $this->paginator->paginate($totalRows, $size, $page); return $this; }