Storm\Core\Object\IEntityMap::GetEntityType PHP Метод

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

public GetEntityType ( ) : string
Результат string
    public function GetEntityType();

Usage Example

Пример #1
0
 /**
  * {@inheritDoc}
  */
 public final function Initialize(DomainDatabaseMap $DomainDatabaseMap)
 {
     $this->OnInitialize($DomainDatabaseMap);
     $this->EntityMap = $this->EntityMap($DomainDatabaseMap->GetDomain());
     $this->EntityType = $this->EntityMap->GetEntityType();
     if (!$this->EntityMap instanceof Object\IEntityMap) {
         throw new \Storm\Core\UnexpectedValueException('Return value from %s->EntityMap() must be an instance of %s, %s given', get_class($this), Object\IEntityMap::IEntityMapType, \Storm\Core\Utilities::GetTypeOrClass($this->EntityMap));
     }
     $Database = $DomainDatabaseMap->GetDatabase();
     $Registrar = new Registrar(IPropertyMapping::IPropertyMappingType);
     $this->RegisterPropertyMappings($Registrar, $this->EntityMap, $Database);
     foreach ($Registrar->GetRegistered() as $PropertyMapping) {
         $this->AddPropertyMapping($PropertyMapping);
     }
     foreach ($this->MappedReviveColumns as $MappedReviveColumn) {
         $Table = $MappedReviveColumn->GetTable();
         $this->ReviveTables[$Table->GetName()] = $Table;
     }
     foreach ($this->MappedPersistColumns as $MappedPersistColumn) {
         $Table = $MappedPersistColumn->GetTable();
         $this->PersistTables[$Table->GetName()] = $Table;
     }
     if ($this->PrimaryKeyTable === null) {
         throw new MappingException('The property mappings of %s must contain atleast 1 identity primary key mapping', get_class($this));
     }
     $this->OnInitialized($DomainDatabaseMap);
 }
All Usage Examples Of Storm\Core\Object\IEntityMap::GetEntityType