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

Gets the name of the column.
public GetName ( ) : string
Результат string
 public function __construct(Object\IDataProperty $DataProperty, Relational\IColumn $Column)
 {
     parent::__construct($DataProperty);
     if ($DataProperty->IsIdentity() && !$Column->IsPrimaryKey()) {
         throw new MappingException('Cannot map an identity property to a non primary key column %s.%s', $Column->GetTable()->GetName(), $Column->GetName());
     } else {
         if ($Column->IsPrimaryKey() && !$DataProperty->IsIdentity()) {
             throw new MappingException('Cannot map an non identity property to a primary key column %s.%s', $Column->GetTable()->GetName(), $Column->GetName());
         } else {
             if ($Column->IsPrimaryKey() && $DataProperty->IsIdentity()) {
                 $this->IsIdentityPrimaryKeyMapping = true;
             }
         }
     }
     $this->DataProperty = $DataProperty;
     $this->Column = $Column;
 }
Пример #2
0
 private function MakeColumnName(Relational\Table $Table, Relational\IColumn $Column)
 {
     return $Table->GetName() . '_' . $Column->GetName();
 }
Пример #3
0
 /**
  * Add a column to the table.
  * 
  * @param IColumn $Column The column to add
  * @throws InvalidColumnException If the column belongs to another table
  */
 private function AddColumn(IColumn $Column)
 {
     if ($Column->HasTable()) {
         if (!$Column->GetTable()->Is($this)) {
             throw new InvalidColumnException('The registered column %s is already registered with another table %s.', $Column->GetName(), $Column->GetTable()->GetName());
         }
     }
     $Column->SetTable($this);
     $ColumnName = $Column->GetName();
     $ColumnIdentifier = $Column->GetIdentifier();
     $this->Columns[$ColumnName] = $Column;
     $this->ColumnsByIdentifiers[$ColumnIdentifier] = $Column;
     if ($Column->IsPrimaryKey()) {
         $this->PrimaryKeyColumns[$ColumnName] = $Column;
         $this->PrimaryKeyColumnByIdentifiers[$ColumnIdentifier] = $Column;
     }
 }