Пример #1
0
 public function getParamDirect($name = "")
 {
     try {
         if (strlen($this->params[$name]) < 1) {
             $value = NULL;
             switch ($name) {
                 case "url":
                     $URLParamPattern = LBoxConfigSystem::getInstance()->getParamByPath("paging/url_param_pattern");
                     $URLParamPattern = str_replace("<paging_id>", $this->paging->getPagingID(), $URLParamPattern);
                     $URLParam = str_replace("<paging_page>", $this->number, $URLParamPattern);
                     $URLParamPattern = str_replace("<paging_page>", "(\\d+)", $URLParamPattern);
                     $URLParam = str_replace("/", "", $URLParam);
                     $URLParam = str_replace("\\", "", $URLParam);
                     if ($this->getNumber() > 1) {
                         $value = LBoxUtil::getURLWithParams(array($URLParam), LBoxUtil::getURLWithoutParamsByPattern($URLParamPattern));
                     } else {
                         $value = LBoxUtil::getURLWithoutParamsByPattern($URLParamPattern);
                     }
                     break;
                 default:
                     $value = NULL;
             }
             return $this->params[$name] = $value;
         } else {
             return $this->params[$name];
         }
     } 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;
     }
 }
 /**
  * pretizeno o konretni pozadavky abstract recordu
  * @param QueryBuilderWhere $classNameIterator
  * @param int $pageItems
  * @param array $filter
  * @param array $order
  * @param array $limit
  * @param QueryBuilderWhere $whereAdd
  */
 public function __construct($classNameIterator, $pageItems, $classNameOutputFilter = "", $filter = false, $order = false, $limit = false, QueryBuilderWhere $whereAdd = NULL)
 {
     try {
         parent::__construct($classNameIterator, $pageItems);
         $this->classNameOutputFilter = $classNameOutputFilter;
         $this->filter = $filter;
         $this->order = $order;
         $this->limit = $limit;
         $this->whereAdd = $whereAdd;
     } catch (Exception $e) {
         throw $e;
     }
 }