public function getTotalPages()
    {
        if (empty($this->totalPages)) {
            $this->totalPages = (int)ceil($this->getCursor()->count()/$this->limit);
        }

        return $this->totalPages;
    }
public function getTotalPages()
    {
        if (empty($this->totalPages)) {
            $this->totalPages = (int)ceil($this->getCursor()->count()/$this->limit);
        }

        return $this->totalPages;
    }
public function getTotalPages ( ) { if ( empty ( $ this -> totalPages ) ) { $ this -> totalPages = ( int ) ceil ( $ this -> getCursor ( ) -> count ( ) / $ this -> limit ) ; } return $ this -> totalPages ; }
Returns number of pages

@return int
Returns number of pages