Load() final public method

Loads all entities that are specified from the given request instance.
final public Load ( Storm\Core\Object\IRequest $ObjectRequest ) : array | object | null
$ObjectRequest Storm\Core\Object\IRequest The request to load
return array | object | null Depending on the supplied request, either all the entities are returned as an array or the first is returned or null if none are found.
コード例 #1
0
ファイル: Repository.php プロジェクト: timetoogo/penumbra
 /**
  * Loads an entity from an identity instance.
  * 
  * @param Object\Identity $Identity The identity of the entity
  * @return object|null
  */
 protected function LoadByIdentity(Object\Identity $Identity)
 {
     $CachedEntity = $this->IdentityMap->GetFromCache($Identity);
     if ($CachedEntity instanceof $this->EntityType) {
         return $CachedEntity;
     }
     $Entity = $this->DomainDatabaseMap->Load(new Base\Object\Request($this->EntityType, $this->EntityMap->GetProperties(), true, new Base\Object\Criteria\MatchesCriterion($Identity)));
     if ($Entity instanceof $this->EntityType) {
         $this->IdentityMap->CacheEntity($Entity, $Identity);
     }
     return $Entity;
 }