Ejemplo n.º 1
0
 /**
  * Применяет ограничения на выборку
  * @param ISelectBuilder $selectBuilder
  */
 protected function applyLimitConditions(ISelectBuilder $selectBuilder)
 {
     if ($this->limit) {
         $postfix = self::PLACEHOLDER_SEPARATOR . $this->collection->getName();
         $limitPlaceholder = ':limit' . $postfix;
         $selectBuilder->limit($limitPlaceholder)->bindInt($limitPlaceholder, $this->limit);
         if ($this->offset) {
             $offsetPlaceholder = ':offset' . $postfix;
             $selectBuilder->offset($offsetPlaceholder)->bindInt($offsetPlaceholder, $this->offset);
         }
     }
 }