GetEntityType() public method

public GetEntityType ( ) : string
return string
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;
 }
Example #2
0
 /**
  * @access private
  * 
  * Maps a given object request to the relational equivalent.
  * 
  * @param IRequest $ObjectRequest The object request
  * @return Relational\Request The equivalent relational request
  */
 public final function MapRequest(Object\IRequest $ObjectRequest)
 {
     $EntityRelationalMap = $this->VerifyEntityTypeIsMapped($ObjectRequest->GetEntityType());
     $RelationalRequest = new Relational\Request([], $EntityRelationalMap->GetCriterion());
     $this->MapPropetiesToRelationalRequest($EntityRelationalMap, $RelationalRequest, $ObjectRequest->GetProperties());
     $this->MapCriterion($EntityRelationalMap, $ObjectRequest->GetCriterion(), $RelationalRequest->GetCriterion());
     return $RelationalRequest;
 }