getCurrentPage() - $this->pageNumberLength - 1 < 1)) { return; } return ''.($caption ? $caption : 1).'' . ($caption ? '' : '...'); } public function lastPage($caption = '') { if ((!$caption && $this->_currentPage > $this->getTotalPage() - $this->pageNumberLength - 1)) { return; } return ($caption ? '' : ' ... ') . ''.($caption ? $caption : $this->_totalPage).''; } public function pageNumber($length = null) { if ($length) { $this->pageNumberLength = $length; } else { $length = $this->pageNumberLength; } $str = null; for ($i = $this->getCurrentPage() - $length; $i < $this->getCurrentPage() + $length + 1; $i++) { if ($i < 1 || $i > $this->getTotalPage()) continue; $str .= '