limit; } public function offset(): int { return (int) ( abs( ( $this->page - 1 ) * $this->limit() ) ); } public function pagination(int $page, int $itemCount) : void { $this->count = $itemCount; $this->page = $page; } public function pageCount() : int { return ceil($this->count / $this->limit()); } public function hasPagination() : int { return $this->pageCount() > 1; } public function skipCount(bool $value) : self { $this->skipCount = $value; return $this; } }