Return an array of columns for a table.

@see AnDomainResourceInterface::getColumns()

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

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

        return $columns;
    }
31535
protected function getFields()
  {
    $fields = $this->db->getTableColumns($this->tbl);
    if ( empty($fields) ){
      throw new TableException('Table columns not found');
    }
    
    return $fields;
  }
953678
public function columns(): array
    {
        return [
            new CensusColumnFullName($this, 'Name', 'Name'),
            new CensusColumnAge($this, 'Age', 'Age'),
            new CensusColumnSexMF($this, 'Sex', 'Sex'),
            new CensusColumnNull($this, 'Color', 'White, black, or mulatto'),
            new CensusColumnOccupation($this, 'Occupation', 'Profession, occupation, or trade'),
            new CensusColumnNull($this, 'RE', 'Value of real estate owned'),
            new CensusColumnBirthPlaceSimple($this, 'Birthplace', 'Place of birth, naming the state, territory, or country'),
            new CensusColumnMarriedWithinYear($this, 'Mar', 'Married within the year'),
            new CensusColumnNull($this, 'School', 'Attended school within the year'),
            new CensusColumnNull($this, 'R+W', 'Persons over 20 years of age who cannot read and write'),
            new CensusColumnNull($this, 'Infirm', 'Whether deaf and dumb, blind, insane, idiotic, pauper or convict'),
        ];
    }
130849
public function getColumns()
    {
        if (empty($this->_columns)) {
            $properties = $this->getInspector()->getClassProperties();
            foreach ($properties as $property) {
                $annotations = $this->getInspector()
                    ->getPropertyAnnotations($property);
                if ($annotations->hasAnnotation('column')) {
                    $this->_columns[$property] =
                        $annotations->getAnnotation('column');
                    $this->_columns[$property]->field = trim($property, '_');
                }
            }
        }
        return $this->_columns;
    }
763788
public function getStorageColumns()
    {
        $columns = $this->createStorageColumns();

        $namedColumns = [];

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

        return $namedColumns;
    }
86594
public function getColumns()
    {
        $columns = array();
        $columns[$this->_parent_key] = $this->_child_column;
        if ($this->_polymorphic) {
            $columns['type'] = $this->_type_column;
        }

        return $columns;
    }
758107
public function getColumns($table)
    {
        if (!isset($this->_columns[$table])) {
            $fields = $this->_adapter->select('SHOW COLUMNS FROM #__'.$table, AnDatabase::FETCH_ARRAY_LIST);

            static    $column;

            $columns = array();

            foreach ($fields as $field) {
                list($type, $length, $scope) = $this->_parseColumnType($field['Type']);
                $column = $column ? clone $column : new AnDomainResourceColumn();
                $column->name = $field['Field'];
                $column->type = isset($this->_typemap[$type]) ? $this->_typemap[$type] : 'string';
                $column->default = $field['Default'];
                $column->required = $field['Null'] == 'NO';
                $column->primary = $field['Key'] == 'PRI';
                $column->unique = $field['Key'] == 'UNI';
                $columns[$column->name] = $column;
            }

            $this->_columns[$table] = $columns;
        }

        return $this->_columns[$table];
    }
394046
private function getColumns()
    {
        $dimensions = $this->getApplication()->getTerminalDimensions();
        if (is_array($dimensions) && count($dimensions) > self::DIMENSION_WIDTH) {
            return $dimensions[self::DIMENSION_WIDTH];
        } else {
            return self::DEFAULT_WIDTH;
        }
    }
1299932
public function columns(): array
    {
        return [
            new CensusColumnNull($this, 'Schedule', 'Schedule Number'),
            new CensusColumnNull($this, 'SubNum', 'Schedule Sub Number'),
            new CensusColumnSurnameGivenNames($this, 'Name', 'Surname & other names'),
            new CensusColumnNull($this, 'Role', 'For institutions only – for example, Officer, Visitor, Servant, Patient, Inmate'),
            new CensusColumnSexMF($this, 'Sex', 'Male or Female'),
            new CensusColumnBirthDayMonthSlashYear($this, 'DOB', 'Date of birth'),
            new CensusColumnConditionEnglish($this, 'MC', 'Marital Condition - Married, Single, Unmarried, Widowed or Divorced'),
            new CensusColumnOccupation($this, 'Occupation', 'Occupation'),
        ];
    }
1068064
public function columns(): array
    {
        return [
            new CensusColumnSurname($this, 'Nom', 'Nom de famille'),
            new CensusColumnGivenNames($this, 'Prénom', 'Prénom usuel'),
            new CensusColumnRelationToHead($this, 'Parenté', 'Parenté avec le chef de ménage ou situation dans le ménage'),
            new CensusColumnBirthYear($this, 'Année', 'Année de naissance'),
            new CensusColumnNationality($this, 'Nationalité', ''),
            new CensusColumnOccupation($this, 'Profession', ''),
        ];
    }
798708
public function getTableColumns($tableName): array
    {
        $schema  = $this->getSchema();
        $columns = $schema->listTableColumns($tableName);

        return $columns;
    }
30878
public function getLocalColumnObjects()
    {
        $columns = array();
        $localTable = $this->getTable();
        foreach ($this->localColumns as $columnName) {
            $columns[] = $localTable->getColumn($columnName);
        }

        return $columns;
    }
519056
public function columns(): array
    {
        return [
            new CensusColumnFullName($this, 'Jméno', ''),
            new CensusColumnRelationToHead($this, 'Vztah', ''),
            new CensusColumnSexMZ($this, 'Pohlaví', ''),
            new CensusColumnBirthDaySlashMonthYear($this, 'Narození', 'Datum narození'),
            new CensusColumnBirthPlace($this, 'Rodiště', 'Místo narození'),
            new CensusColumnNull($this, 'Přísluší', 'Domovské právo'),
            new CensusColumnReligion($this, 'Vyznání', ''),
            new CensusColumnNull($this, 'Stav', 'Rodinný stav'),
            new CensusColumnNull($this, 'Jazyk', 'Jazyk v obcování'),
            new CensusColumnOccupation($this, 'Povolání', ''),
            new CensusColumnNull($this, 'Postavení', 'Postavení v zaměstnání'),
            new CensusColumnNull($this, 'Gramotnost', 'Znalost čtení a psaní'),
            new CensusColumnNull($this, 'Druh pobytu', 'Pobyt dočasný nebo trvalý'),
            new CensusColumnNull($this, 'Od roku', 'Počátek pobytu'),
        ];
    }
903733
private function getDatatableColumns(): array
    {
        $result = $this->getDisplayColumns();

        if (!$this->getGroupByField()) {
            $result[] = Utility::MENU_PROPERTY_NAME;
        }

        if (!$this->getGroupByField() && $this->batch) {
            $table = TableRegistry::get($this->entity->get('model'));
            // add primary key in FIRST position
            foreach ((array)$table->getPrimaryKey() as $primaryKey) {
                array_unshift($result, $table->aliasField($primaryKey));
            }
        }

        return $result;
    }
1328499
final public static function getColumns()
    {
        $result = [];
        foreach (static::COLUMNS as $column) {
            $result[] = trim(explode('[', $column, 2)[0]);
        }
        return $result;
    }
87456
public function columns(): array
    {
        return [
            new CensusColumnFullName($this, 'Name', 'Name of head of family'),
            new CensusColumnNull($this, 'M0-10', 'Free white males 0-10 years'),
            new CensusColumnNull($this, 'M10-16', 'Free white males 10-16 years'),
            new CensusColumnNull($this, 'M16-26', 'Free white males 16-26 years'),
            new CensusColumnNull($this, 'M26-45', 'Free white males 26-45 years'),
            new CensusColumnNull($this, 'M45+', 'Free white males 45+ years'),
            new CensusColumnNull($this, 'F0-10', 'Free white females 0-10 years'),
            new CensusColumnNull($this, 'F10-16', 'Free white females 10-16 years'),
            new CensusColumnNull($this, 'F16-26', 'Free white females 16-26 years'),
            new CensusColumnNull($this, 'F26-45', 'Free white females 26-45 years'),
            new CensusColumnNull($this, 'F45+', 'Free white females 45+ years'),
            new CensusColumnNull($this, 'Free', 'All other free persons, except Indians not taxed'),
            new CensusColumnNull($this, 'Slaves', 'Number of slaves'),
            new CensusColumnNull($this, 'Total', 'Total number of individuals'),

        ];
    }
403442
public function columns(): array
    {
        return [
            new CensusColumnFullName($this, 'Name', 'Name'),
            new CensusColumnAge($this, 'Age', 'Age'),
            new CensusColumnSexMF($this, 'Sex', 'Sex'),
            new CensusColumnNull($this, 'Color', 'White, Black, Mulatto, Chinese, Indian'),
            new CensusColumnOccupation($this, 'Occupation', 'Profession, occupation, or trade'),
            new CensusColumnNull($this, 'RE', 'Value of real estate owned'),
            new CensusColumnNull($this, 'PE', 'Value of personal estate owned'),
            new CensusColumnBirthPlaceSimple($this, 'Birthplace', 'Place of birth, naming the state, territory, or country'),
            new CensusColumnFatherForeign($this, 'FFB', 'Father of foreign birth'),
            new CensusColumnMotherForeign($this, 'MFB', 'Mother of foreign birth'),
            new CensusColumnMonthIfBornWithinYear($this, 'Born', 'If born within the year, state month'),
            new CensusColumnMonthIfMarriedWithinYear($this, 'Mar', 'If married within the year, state month'),
            new CensusColumnNull($this, 'School', 'Attended school within the year'),
            new CensusColumnNull($this, 'Read', 'Cannot read'),
            new CensusColumnNull($this, 'Write', 'Cannot write'),
            new CensusColumnNull($this, 'Infirm', 'Whether deaf and dumb, blind, insane, or idiotic'),
            new CensusColumnNull($this, 'Cit', 'Male citizen of US'),
            new CensusColumnNull($this, 'Dis', 'Male citizen of US, where right to vote is denied or abridged'),
        ];
    }