public final function LoadRegistrarFromProperties(Registrar $Registrar) { $RegisterableType = $Registrar->GetRegisterableType(); foreach ($this->GetPublicPropertyValues() as $Value) { if ($Value instanceof $RegisterableType) { $Registrar->Register($Value); } } }
protected final function RegisterEntityMaps(Registrar $Registrar) { $SpecificRegistrar = new Registrar(EntityMap::GetType()); $this->RegisterAllEntityMaps($Registrar); $EntityMaps = $SpecificRegistrar->GetRegistered(); if ($this->HasProxyGenerator()) { $this->UpdateProxyGenerator($EntityMaps); } $Registrar->RegisterAll($EntityMaps); }
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 RegisterColumnStructure(Registrar $Registrar, IColumnSet $Column) { $Registrar->RegisterAll($this->_Columns); }
protected final function RegisterToManyRelations(Registrar $Registrar, Relational\Database $Context) { $Registrar->RegisterAll($this->ToManyRelations); }
protected final function RegisterPropertyMappings(Registrar $Registrar, Object\IEntityMap $EntityMap, Relational\Database $Database) { $this->PropertyMappings = []; $this->InitializeMappings($EntityMap, $Database); $Registrar->RegisterAll($this->PropertyMappings); }
protected final function RegisterEntityRelationalMaps(Registrar $Regisrar) { $Regisrar->RegisterAll($this->EntityMaps); }
protected function RegisterRelationalTraits(Registrar $Registrar, Relational\Database $Context) { $Registrar->Register($this->ForeignKey1); $Registrar->Register($this->ForeignKey2); }
protected final function RegisterProperties(Registrar $Registrar) { $Registrar->RegisterAll($this->EntityProperties); }
protected function RegisterPropertyMappings(Registrar $Registrar, Object\IEntityMap $EntityMap, Relational\Database $Database) { $Registrar->RegisterAll($this->PropertyMappings); }
protected final function RegisterTables(Registrar $Registrar) { $Registrar->RegisterAll($this->Tables); }