/**
  * {@inheritdoc}
  */
 public function getObjectInstanceById(ICollection $collection, $objectId)
 {
     $collectionName = $collection->getName();
     if (isset($this->objectsById[$collectionName][$objectId])) {
         return $this->objectsById[$collectionName][$objectId];
     } else {
         return null;
     }
 }
Beispiel #2
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);
         }
     }
 }
Beispiel #3
0
 /**
  * {@inheritdoc}
  */
 public function getTypePath()
 {
     $typePath = $this->collection->getName() . IObjectType::PATH_SEPARATOR . $this->type->getName();
     return $typePath;
 }