setPerPage($perPage); } public function setPage($getParamNum = 0) { if (System_Router::getParam($getParamNum) > 0) { $this->page = System_Router::getParam($getParamNum); } } public function getPage() { return $this->page; } public function setPerPage($perPage) { $this->perPage = (is_integer($perPage)) ? $perPage : 10; } public function getPerPage() { return $this->perPage; } public function setAllElements($allElements) { $this->allElements = (int)$allElements; } public function getAllElements() { return $this->allElements; } public function getCurrentCount() { if (!$this->currentCount) { $this->currentCount = ($this->getPage()-1)*$this->getPerPage(); } return $this->currentCount; } public function getAllPages() { if (!$this->allPages) { $this->allPages = ceil($this->getAllElements()/$this->getPerPage()); } return $this->allPages; } public function setBaseUrl($baseUrl) { $this->baseUrl = $baseUrl; } public function getBaseUrl() { if (!$this->baseUrl) { $this->baseUrl = $_SERVER['REQUEST_URI']; } return $this->baseUrl; } } ?>