Author: Elliot Levin (elliot@aanet.com.au)
示例#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 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);
 }
示例#3
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);
     }
 }
示例#4
0
 protected function RegisterStructuralTraits(Registrar $Registrar)
 {
     $Registrar->Register(new Mysql\Tables\Engine('MYISAM'));
 }
示例#5
0
 protected function RegisterColumnStructure(Registrar $Registrar, IColumnSet $Column)
 {
     $Registrar->RegisterAll($this->_Columns);
 }
示例#6
0
 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);
 }
示例#8
0
 protected final function RegisterEntityRelationalMaps(Registrar $Regisrar)
 {
     $Regisrar->RegisterAll($this->EntityMaps);
 }
示例#9
0
 protected function RegisterRelationalTraits(Registrar $Registrar, Relational\Database $Context)
 {
     $Registrar->Register($this->ForeignKey1);
     $Registrar->Register($this->ForeignKey2);
 }
示例#10
0
 protected final function RegisterProperties(Registrar $Registrar)
 {
     $Registrar->RegisterAll($this->EntityProperties);
 }
示例#11
0
 protected function RegisterPropertyMappings(Registrar $Registrar, Object\IEntityMap $EntityMap, Relational\Database $Database)
 {
     $Registrar->RegisterAll($this->PropertyMappings);
 }
示例#12
0
 protected final function RegisterTables(Registrar $Registrar)
 {
     $Registrar->RegisterAll($this->Tables);
 }