Пример #1
0
 /**
  * @param LBoxPagingIterator $paging
  * @param int $number
  */
 public function __construct(LBoxPagingIterator $paging, $number = 1)
 {
     try {
         $this->paging = $paging;
         $this->number = $number;
         if (!$number > $this->paging->getPageMax()) {
             throw new LBoxExceptionPaging(LBoxExceptionPaging::MSG_PAGE_OUT_OF_RANGE, LBoxExceptionPaging::CODE_PAGE_OUT_OF_RANGE);
         }
         $this->setOutputFilter(new OutputFilterPagingPage($this));
     } catch (Exception $e) {
         throw $e;
     }
 }
Пример #2
0
 /**
  * vraci pocet stranek
  * @return int
  */
 public function count()
 {
     try {
         return $this->paging->getPageMax();
     } catch (Exception $e) {
         throw $e;
     }
 }