Storm\Core\Object\IRequest::GetEntityType PHP Method

GetEntityType() public method

public GetEntityType ( ) : string
return string
    public function GetEntityType();

Usage Example

Example #1
0
 /**
  * Load entities specified by a request instance.
  * 
  * @param Object\IRequest $Request The request to load
  * @return object|null|array
  * @throws Object\TypeMismatchException
  */
 public function LoadRequest(Object\IRequest $Request)
 {
     if ($Request->GetEntityType() !== $this->EntityType) {
         throw new Object\TypeMismatchException('The supplied request is of type %s, expecting: %s', $Request->GetEntityType(), $this->EntityType);
     }
     $Entities = $this->DomainDatabaseMap->Load($Request);
     if (is_array($Entities)) {
         $this->IdentityMap->CacheEntities($Entities);
     } else {
         if ($Entities instanceof $this->EntityType) {
             $this->IdentityMap->CacheEntity($Entities);
         }
     }
     return $Entities;
 }
All Usage Examples Of Storm\Core\Object\IRequest::GetEntityType