Gets a table column if it exists.

@param string $name Column name
@return \Phinx\Db\Table\Column|null
160401
public function getColumn($name)
    {
        $columns = array_filter(
            $this->getColumns(),
            function ($column) use ($name) {
                return $column->getName() === $name;
            }
        );

        return array_pop($columns);
    }
67499
public function getTable($name = '')
    {
        if (empty($name) && isset($this->options['table'])) {
            return $this->options['table'];
        }

        $name = $name ?: $this->name;

        return $this->prefix . Db::parseName($name);
    }
765055
public function query($name)
    {
        $exists = isset($this->queries[$name]);

        return $exists ? $this->queries[$name] : null;
    }
5886
protected function findTableFromName($name)
    {
        foreach ($this->tables as $table) {
            if ($table->getName() === $name) {
                return $table;
            }
        }

        return null;
    }
544022
public function getColumn($name)
    {
        if (!$this->hasColumn($name)) {
            throw SchemaException::tableColumnDoesNotExist($this->getName(), $name);
        }

        return $this->columns[$name];
    }
279954
public function getField($name)
		{
			return isset($this->fields[$name])
				? $this->fields[$name]
				: null;
		}
1091337
public function getColumn($name)
    {
        return isset($this->columns[$name]) ? $this->columns[$name] : false;
    }
385196
public function getColumnMeta($name = '')
    {

        $retval = array();
        $field = NULL;
        while ($field = mysqli_fetch_field($this->getResultId())) {
            $f = new stdClass();
            $f->name = $field->name;
            $f->type = $field->type;
            $f->default = $field->def;
            $f->maxLength = $field->max_length;
            $f->primaryKey = $field->primary_key;

            $retval[] = $f;
        }

        return $retval;
    }
283369
private function getColumnFromName($name)
    {
        foreach ($this->columnConfiguration as $i => $col) {
            if ($col->getName() == $name) {
                return $col;
            }
        }

        // This exception should never happen. If it does, something is
        // wrong w/ the relationship between searchable columns and the
        // configuration.
        throw new DatatableException("A requested column was not found in the columnConfiguration.");
    }
908830
public function getField($name)
    {
        return (null !== $name && array_key_exists($name, $this->fields)) ? $this->fields[$name] : null;
    }
133216
public function getTable($tablename) {
        $i = $this->findTableInArray($tablename);
        if ($i !== null) {
            return $this->tables[$i];
        }
        return null;
    }
1135153
public function type($name)
    {
        if (!$this->has($name)) {
            return;
        }
        $column = $this->column($name);
        return isset($column['type']) ? $column['type'] : null;
    }
1306760
public function getColumn($name) {
        if ($this->hasColumn($name)) {
            return $this->_columns[$name];
        }

        throw new MissingColumnException(sprintf('Repository column %s does not exist', $name));
    }
1220140
protected function loadIndexSchema($name)
    {
        $index = new IndexSchema();
        $this->resolveIndexNames($index, $name);
        $this->resolveIndexType($index);

        if ($this->findColumns($index)) {
            return $index;
        }
        return null;
    }
282203
public function getColumn($name, $need = TRUE)
    {
        return $this->hasColumns()
            ? $this->getComponent(Column::ID)->getComponent(Helpers::formatColumnName($name), $need)
            : NULL;
    }
443223
public function fetch($name)
    {
        return $this->get($name, function($instance, $name) {
            $collection = [$instance];
            $this->schema()->embed($collection, $name);
            return isset($this->_data[$name]) ? $this->_data[$name] : null;
        });
    }
1358276
public function findColumn(string $name)
    {
        if (!is_string($name)) {
            throw InvalidArgumentException::format('Column name must be string, %s given', gettype($name));
        }

        return isset($this->columns[$name]) ? $this->columns[$name] : null;
    }