public function addColumn($data)
    {
        if ($data instanceof Column) {
            $column = $data;
            $this->columns[] = $column->getName();
            if ($column->getSize()) {
                $this->columnsSize[$column->getName()] = $column->getSize();
            }
            $this->columnObjects[] = $column;
        } else {
            $this->columns[] = $name = $data['name'];
            if (isset($data['size']) && $data['size'] > 0) {
                $this->columnsSize[$name] = $data['size'];
            }
            if ($this->getTable()) {
                $this->columnObjects[] = $this->getTable()->getColumn($name);
            }
        }
    }
public function addColumn($data)
    {
        if ($data instanceof Column) {
            $column = $data;
            $this->columns[] = $column->getName();
            if ($column->getSize()) {
                $this->columnsSize[$column->getName()] = $column->getSize();
            }
            $this->columnObjects[] = $column;
        } else {
            $this->columns[] = $name = $data['name'];
            if (isset($data['size']) && $data['size'] > 0) {
                $this->columnsSize[$name] = $data['size'];
            }
            if ($this->getTable()) {
                $this->columnObjects[] = $this->getTable()->getColumn($name);
            }
        }
    }
public function addColumn ( $ data ) { if ( $ data instanceof Column ) { $ column = $ data ; $ this -> columns [ ] = $ column -> getName ( ) ; if ( $ column -> getSize ( ) ) { $ this -> columnsSize [ $ column -> getName ( ) ] = $ column -> getSize ( ) ; } $ this -> columnObjects [ ] = $ column ; } else { $ this -> columns [ ] = $ name = $ data [ 'name' ] ; if ( isset ( $ data [ 'size' ] ) && $ data [ 'size' ] > 0 ) { $ this -> columnsSize [ $ name ] = $ data [ 'size' ] ; } if ( $ this -> getTable ( ) ) { $ this -> columnObjects [ ] = $ this -> getTable ( ) -> getColumn ( $ name ) ; } } }
Adds a new column to the index.

@param Column|array $data Column or attributes from XML.
Adds a new column to the index .