public final function setColumn(ColumnInterface $column) : TableInterface { if ($this->isImmutable()) { throw SchemaException::immutable(static::class); } if ($this->hasColumn($column->getName())) { throw SchemaException::columnAlreadySet(static::class, $column->getName()); } $this->columns[$column->getName()] = $column; return $this; }
public function add(ColumnInterface $column) { $this->columns[$column->getName()] = $column; }