Nextras\Orm\Entity\IEntity::getRepository PHP Метод

getRepository() публичный Метод

Returns entity repository.
public getRepository ( boolean $need = true ) : Nextras\Orm\Repository\IRepository | null
$need boolean
Результат Nextras\Orm\Repository\IRepository | null
    public function getRepository($need = true);

Usage Example

Пример #1
0
 /**
  * @return ICollection
  */
 protected function getCachedCollection()
 {
     $key = spl_object_hash($this->parent->getPreloadContainer()) . '_' . $this->metadata->name;
     $cache = $this->parent->getRepository()->getMapper()->getCollectionCache();
     if (!isset($cache->{$key})) {
         $cache->{$key} = $this->createCollection();
     }
     $this->collection = $cache->{$key};
     return $cache->{$key};
 }
All Usage Examples Of Nextras\Orm\Entity\IEntity::getRepository