Paginator/Paginator.php
public function getLastPage($id = null)
    {
        $totalItems = ($this->getTotalItems($id) > 0) ? $this->getTotalItems($id) : 1;
        return (int)ceil($totalItems / $this->getItemsPerPage($id));
    }
public function getLastPage($id = null)
    {
        $totalItems = ($this->getTotalItems($id) > 0) ? $this->getTotalItems($id) : 1;
        return (int)ceil($totalItems / $this->getItemsPerPage($id));
    }
public function getLastPage ( $ id = null ) { $ totalItems = ( $ this -> getTotalItems ( $ id ) > 0 ) ? $ this -> getTotalItems ( $ id ) : 1 ; return ( int ) ceil ( $ totalItems / $ this -> getItemsPerPage ( $ id ) ) ; }
Gets the last page number

@param string $id
@return int
Gets the last page number