Returns columns in a table.

@access 	public
@return 	Mixed
486486
public function getColumns()
	{
		$columns = $this->builder()->queryWithBinding(Expressions::getColumns($this->tableName))->get()->all();

		$_columns = [];

		foreach($columns as $column) {
			$_columns[] = Repository::getPlatformColumn($column);
		}

		return $_columns;
	}
1042771
public function columns()
    {
        $orig = $this->origLanguage();
        $opposites = $this->oppositeLanguages();

        $columns = [ $orig ];

        foreach ($opposites as $lang) {
            $columns[] = $lang;
        }

        // Add context.
        $columns[] = 'context';

        return $columns;
    }
576977
private function getNumberOfColumns()
    {
        if (null !== $this->numberOfColumns) {
            return $this->numberOfColumns;
        }

        $columns = [\count($this->headers)];
        foreach ($this->rows as $row) {
            $columns[] = \count($row);
        }

        return $this->numberOfColumns = \max($columns);
    }
646815
public function get_columns() {
        if (isset($this->_columns)) {
            return $this->_columns;
        }

        global $USER, $CFG;

        $filename = $CFG->tempdir.'/csvimport/'.$this->_type.'/'.$USER->id.'/'.$this->_iid;
        if (!file_exists($filename)) {
            return false;
        }
        $fp = fopen($filename, "r");
        $line = fgetcsv($fp);
        fclose($fp);
        if ($line === false) {
            return false;
        }
        $this->_columns = $line;
        return $this->_columns;
    }
288392
public function getColumns()
	{
		$return = $this->columns;

		try {
			$this->getParent();

			if (!$this->getSessionData('_grid_hidden_columns_manipulated', false)) {
				$columns_to_hide = [];

				foreach ($this->columns as $key => $column) {
					if ($column->getDefaultHide()) {
						$columns_to_hide[] = $key;
					}
				}

				if (!empty($columns_to_hide)) {
					$this->saveSessionData('_grid_hidden_columns', $columns_to_hide);
					$this->saveSessionData('_grid_hidden_columns_manipulated', true);
				}
			}

			$hidden_columns = $this->getSessionData('_grid_hidden_columns', []);

			foreach ($hidden_columns as $column) {
				if (!empty($this->columns[$column])) {
					$this->columns_visibility[$column] = [
						'visible' => false,
					];

					unset($return[$column]);
				}
			}

		} catch (DataGridHasToBeAttachedToPresenterComponentException $e) {
		}

		return $return;
	}
1068515
public function get_columns() {
		return array(
			'sunday'    => $GLOBALS['wp_locale']->get_weekday( 0 ),
			'monday'    => $GLOBALS['wp_locale']->get_weekday( 1 ),
			'tuesday'   => $GLOBALS['wp_locale']->get_weekday( 2 ),
			'wednesday' => $GLOBALS['wp_locale']->get_weekday( 3 ),
			'thursday'  => $GLOBALS['wp_locale']->get_weekday( 4 ),
			'friday'    => $GLOBALS['wp_locale']->get_weekday( 5 ),
			'saturday'  => $GLOBALS['wp_locale']->get_weekday( 6 )
		);
	}
94502
private function _getColumns()
    {
        $columns = [];
        foreach ($this->_config['columns'] as $data) {
            $columns[] = new Column($data, $this->_config['view_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;
  }
315300
public function getTableColumns() : array
    {
        if (!$this->isTableNameSet()) {
            return [];
        }
        
        $sql = "SHOW COLUMNS FROM `".$this->tableName."`";
        $stmt = $this->db->query($sql);
        $arrResult = $stmt->fetchAll(PDO::FETCH_ASSOC);
        return $arrResult;
    }
763788
public function getStorageColumns()
    {
        $columns = $this->createStorageColumns();

        $namedColumns = [];

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

        return $namedColumns;
    }
798449
public function getColumns()
    {
        if (!$this->columns && $this->length()) {
            if ($this->first() instanceof DataInterface) {
                $this->columns = array_keys($this->first()->toArray());
            } elseif (is_array($this->first())) {
                $this->columns = array_keys($this->first());
            }
        }

        return $this->columns;
    }
616844
public static function getColumns()
    {
        $cls = get_called_class();
        if (!array_key_exists($cls, self::$_columns)) {
            return null;
        }
        return self::$_columns[$cls];
    }
404253
public function getColumns(): array
    {
        $tSelects = isset($this->statements['selects']) === true ? $this->statements['selects'] : [];
        $tColumns = [];
        foreach ($tSelects as $key => $value) {
            if (\is_string($value)) {
                if (\is_int($key)) {
                    $tElements = explode('.', $value);
                    if (!\in_array('*', $tElements, true)) {
                        $tColumns[$tElements[1] ?? $tElements[0]] = $value;
                    }
                } elseif (\is_string($key)) {
                    $tColumns[$value] = $key;
                }
            }
        }
        return $tColumns;
    }
1251925
public function columns($table)
	{
		$columns = array();
		$sth = $this->queryColumnInfo($table);

		while (($row = $sth->fetch())) {
			$c = $this->createColumn($row);
			$columns[$c->name] = $c;
		}
		return $columns;
	}
550470
public function getColumnWidths()
    {
        foreach ($this->columnWidths as $column => $width) {
            if ($width > $this->maxColumnWidth) {
                $this->columnWidths[$column] = $this->maxColumnWidth;
            } elseif ($width < $this->minColumnWidth) {
                $this->columnWidths[$column] = $this->minColumnWidth;
            }
        }

        return $this->columnWidths;
    }
391672
public function getFields()
    {
        $fields = array();
        foreach ($this->columns as $column) {
            $fields = array_merge($fields, $column->getFields());
        }

        return $fields;
    }
1296900
protected function _getCols()
    {
        if (null === $this->_cols) {
            $this->_setupMetadata();
            $this->_cols = array_keys($this->_metadata);
        }
        return $this->_cols;
    }