Storm\Drivers\Base\Object\EntityMap::__construct PHP Метод

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

public __construct ( )
    public function __construct()
    {
        parent::__construct();
        $this->EntityConstructor = $this->EntityConstructor();
        if (!$this->EntityConstructor instanceof Construction\IEntityConstructor) {
            throw new Object\ObjectException('The supplied entity constructor must implement %s: %s given', Construction\IEntityConstructor::IEntityConstructorType, \Storm\Core\Utilities::GetTypeOrClass($this->EntityConstructor));
        }
        if ($this->EntityConstructor->HasEntityType()) {
            throw new Object\ObjectException('The supplied entity constructor %s already has an entity type %s', get_class($this->EntityConstructor), $this->EntityConstructor->GetEntityType());
        }
        $this->EntityConstructor->SetEntityType($this->GetEntityType());
    }

Usage Example

Пример #1
0
 public function __construct($EntityType, array $EntityProperties, Object\Construction\IEntityConstructor $EntityConstructor)
 {
     $this->EntityType = $EntityType;
     $this->EntityProperties = $EntityProperties;
     $this->EntityConstructor = $EntityConstructor;
     parent::__construct();
 }
All Usage Examples Of Storm\Drivers\Base\Object\EntityMap::__construct