Register() 공개 메소드

public Register ( $Instance )
예제 #1
0
 public final function LoadRegistrarFromProperties(Registrar $Registrar)
 {
     $RegisterableType = $Registrar->GetRegisterableType();
     foreach ($this->GetPublicPropertyValues() as $Value) {
         if ($Value instanceof $RegisterableType) {
             $Registrar->Register($Value);
         }
     }
 }
예제 #2
0
 protected function OnStructureInitialized(Relational\Database $Database)
 {
     $Registrar = new Containers\Registrar(StructuralTableTrait::GetType());
     $PrimaryKeyColumns = $this->GetPrimaryKeyColumns();
     if (count($PrimaryKeyColumns) > 0) {
         $Registrar->Register(new Traits\PrimaryKey($PrimaryKeyColumns));
     }
     $this->RegisterStructuralTraits($Registrar);
     foreach ($Registrar->GetRegistered() as $Trait) {
         $this->AddTrait($Trait);
     }
     $this->KeyGenerator = $this->KeyGenerator($Database->GetPlatform()->GetKeyGeneratorSet());
     if ($this->KeyGenerator !== null) {
         $this->KeyGenerator->SetTable($this);
     }
 }
예제 #3
0
 protected function RegisterStructuralTraits(Registrar $Registrar)
 {
     $Registrar->Register(new Mysql\Tables\Engine('MYISAM'));
 }
예제 #4
0
 protected function RegisterRelationalTraits(Registrar $Registrar, Relational\Database $Context)
 {
     $Registrar->Register($this->ForeignKey1);
     $Registrar->Register($this->ForeignKey2);
 }