page = $page; $this->per_page = $per_page; } /** * @return int */ public function getCurrentPage() { return $this->page; } /** * @return int */ public function getPerPage() { return $this->per_page; } /** * @return int */ public function getOffset() { return ($this->page - 1) * $this->per_page; } /** * @param int $count * @return int */ public function getLastPage($count){ return intval(ceil($count/$this->per_page)); } }