Fetch Field Names

Generates an array of column names

@return	array
481506
public function list_fields()
	{
		$field_names = array();
		foreach (sqlsrv_field_metadata($this->result_id) as $offset => $field)
		{
			$field_names[] = $field['Name'];
		}

		return $field_names;
	}
13931
private static function getFieldNameArray($fields)
    {
        if (count($fields) === 0) {
            return;
        }

        $names = array();

        foreach ($fields as &$field) {
            $names[] = $field->name;
        }

        return $names;
    }
568351
public function getFileFieldNames()
    {
        $results = [];
        if (!isset($this->data['fields'])
            || empty($this->data['fields'])
        ) {
            return $results;
        }

        $table = $this->data['name'];
        foreach ($this->data['fields'] as $field) {
            $name = $table . '_' . $field['name'];

            if (in_array(
                $field['field']['type'],
                [
                        'file',
                        'image',
                        'filelist',
                        'imagelist'
                    ]
            )
            ) {
                $results[] = $name;
            }
        }

        return $results;
    }
1286530
function GetArray()
    {
		$fms = $this->_phreezer->GetFieldMaps(get_class($this));
		$cols = Array();

        foreach ($fms as $fm)
        {
			$prop = $fm->PropertyName;
			$cols[$fm->ColumnName] = $this->$prop;
        }

        return $cols;
	}
195566
protected function getFields()
    {
        if (is_null($this->fields)) {
            $columns = $this->getColumns();

            if (empty($columns)) {
                throw new Exception('The table ' . $this->tableName . ' was not found in the ' . $this->databaseName . ' database.');
            }

            $this->fields = $this->transfer($columns);
        }

        return $this->fields;
    }
1328499
final public static function getColumns()
    {
        $result = [];
        foreach (static::COLUMNS as $column) {
            $result[] = trim(explode('[', $column, 2)[0]);
        }
        return $result;
    }
397530
public function getNames(): array
    {
        $enumeration = $this->enumeration;
        $names       = [];
        foreach ($this->getOrdinals() as $ord) {
            $names[] = $enumeration::byOrdinal($ord)->getName();
        }
        return $names;
    }
950091
public function getTableColumns() : array
    {
        $schema = $this->table->getSchema();

        $result = [];
        foreach ($schema->columns() as $column) {
            if (in_array($column, CsvMigration::getRequiredFields())) {
                continue;
            }

            $result[] = $column;
        }

        return $result;
    }
979973
public function getColumns()
    {
        $columns = array();

        foreach ($this->_columns as $name => $column) {
            $columns[$name] = $this->getColumn($name);
        }

        return $columns;
    }
763788
public function getStorageColumns()
    {
        $columns = $this->createStorageColumns();

        $namedColumns = [];

        foreach ($columns as $column) {
            $namedColumns[$column->columnName] = $column;
        }

        return $namedColumns;
    }
94502
private function _getColumns()
    {
        $columns = [];
        foreach ($this->_config['columns'] as $data) {
            $columns[] = new Column($data, $this->_config['view_name']);
        }
        return $columns;
    }
877157
public function getFields()
    {
        $joins = $this->_sql->getJoins();
        $fields = $this->_sql->getFields();

        if (!is_array($fields)) {
            return $fields;
        }

        if (count($joins) > 0 && $this->_sql->prefixTableName) {
            $table = $this->_sql->getTableName();
            foreach ($fields as $key => $field) {
                $fields[$key] = "{$table}.{$field}";
            }
        }

        return implode(', ', $fields);
    }
888922
protected function getColumns() {
        if ($this->has('columns')) {
            return $this->get('columns', array());
        }
        $data = $this->get('data');
        if (empty($data)) {
            return [];
        }
        $data = (array)$data;
        $columns = array_keys(reset($data));
        $this->set('columns', $columns);
        return $columns;
    }
1143257
private function compileColumnNames()
    {
        $columns = [];
        foreach($this->columnConfiguration as $column) {
            $columns[] = $column->getName();
        }

        return $columns;
    }
1008446
public function getFields() {
        $fields = $this->_fields;

        if ($this->getJoins() && !$fields && $this->getType() === self::SELECT) {
            return array_keys($this->getRepository()->getSchema()->getColumns());
        }

        return $fields;
    }
1067963
static function getColumnNames() {
		$class = get_called_class();
		if (!isset(self::$_columnNames[$class])) {
			self::$_columnNames[$class] = array_keys(static::$_columns);
		}

		return self::$_columnNames[$class];
	}
1334930
public function getTableColumns(): array
    {
        $columns = [
            'country_id' => $this->headerText(trans('HCRegion::regions_city.country_id')),
            'translation.label' => $this->headerText(trans('HCRegion::regions_city.label')),
            'visible' => $this->headerCheckBox(trans('HCRegion::regions_city.visible')),
        ];

        return $columns;
    }