public function setType($type)
    {
        if (is_string($type)) {
            $type = ColumnType::createType($type);
        } elseif (!$type instanceof AbstractType) {
            throw new Exception\InvalidArgumentException(__METHOD__ . ' setType() accepts only AbstractType or string.');
        }
        $this->properties['type'] = $type;

        return $this;
    }
public function setType($type)
    {
        if (is_string($type)) {
            $type = ColumnType::createType($type);
        } elseif (!$type instanceof AbstractType) {
            throw new Exception\InvalidArgumentException(__METHOD__ . ' setType() accepts only AbstractType or string.');
        }
        $this->properties['type'] = $type;

        return $this;
    }
public function setType ( $ type ) { if ( is_string ( $ type ) ) { $ type = ColumnType :: createType ( $ type ) ; } elseif ( ! $ type instanceof AbstractType ) { throw new Exception \ InvalidArgumentException ( __METHOD__ . ' setType() accepts only AbstractType or string.' ) ; } $ this -> properties [ 'type' ] = $ type ; return $ this ; }
Set column datatype.

@param string|AbstractType $type

@throws Exception\InvalidArgumentException when the type is not supported

@return Column
Set column datatype .