public final function LoadRegistrarFromProperties(Registrar $Registrar) { $RegisterableType = $Registrar->GetRegisterableType(); foreach ($this->GetPublicPropertyValues() as $Value) { if ($Value instanceof $RegisterableType) { $Registrar->Register($Value); } } }
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); } }
protected function RegisterStructuralTraits(Registrar $Registrar) { $Registrar->Register(new Mysql\Tables\Engine('MYISAM')); }
protected function RegisterRelationalTraits(Registrar $Registrar, Relational\Database $Context) { $Registrar->Register($this->ForeignKey1); $Registrar->Register($this->ForeignKey2); }