/** * {@inheritdoc} */ public function getObjectInstanceById(ICollection $collection, $objectId) { $collectionName = $collection->getName(); if (isset($this->objectsById[$collectionName][$objectId])) { return $this->objectsById[$collectionName][$objectId]; } else { return null; } }
/** * Применяет ограничения на выборку * @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); } } }
/** * {@inheritdoc} */ public function getTypePath() { $typePath = $this->collection->getName() . IObjectType::PATH_SEPARATOR . $this->type->getName(); return $typePath; }