Gets the list of values for an ENUM column

@param string $colname The ENUM column name.

@return array list of possible values for the column
500664
public static function getValueSet($colname)
    {
        $valueSets = RemoteAppPeer::getValueSets();

        if (!isset($valueSets[$colname])) {
            throw new PropelException(sprintf('Column "%s" has no ValueSet.', $colname));
        }

        return $valueSets[$colname];
    }
659893
private function getColumnAlias($columnName, $mode, array $customRenameColumns)
    {
        switch ($mode) {
            case self::COLUMN_RENAMING_INCREMENT:
                return $columnName . $this->sqlCounter++;

            case self::COLUMN_RENAMING_CUSTOM:
                return isset($customRenameColumns[$columnName])
                    ? $customRenameColumns[$columnName] : $columnName;

            case self::COLUMN_RENAMING_NONE:
                return $columnName;

        }
    }
401052
public function get($columnName)
    {
        if (isset($this->filterDefinitions[$columnName])) {
            return $this->filterDefinitions[$columnName];
        }

        return null;
    }
183876
protected function convertValueForColumn($value, ColumnMap $colMap)
    {
        if ($colMap->getType() == 'OBJECT' && is_object($value)) {
            if (is_array($value)) {
                $value = array_map('serialize', $value);
            } else {
                $value = serialize($value);
            }
        } elseif ($colMap->getType() == 'ARRAY' && is_array($value)) {
            $value = '| ' . implode(' | ', $value) . ' |';
        } elseif ($colMap->getType() == 'ENUM') {
            if (is_array($value)) {
                $value = array_map(array($colMap, 'getValueSetKey'), $value);
            } else {
                $value = $colMap->getValueSetKey($value);
            }
        }

        return $value;
    }
104153
public function getTableColumns($tableName)
    {
        $sql = "SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = :database AND TABLE_NAME = :tableName;";
        $columns = $this->raw($sql, [':database' => $this->getDatabaseName(), ':tableName' => $tableName], 'fetchAll');
        $return_array = [];
        foreach ($columns as $c) {
            $return_array[] = $c->COLUMN_NAME;
        }
        return $return_array;
    }
427400
public function optionsFromEnumColumn($model_name, $column_name, array $extra_options = [])
    {
        $options = [];
        foreach ($model_name::table()->enumValues($column_name) as $val) {
            $options[$this->humanize($val)] = $val;
        }
        
        if ($extra_options) {
            $options = array_merge($extra_options, $options);
        }
        
        return $options;
    }
1224699
public function getAsArray($columName = null)
    {
        if ($columName) {
            $this->rewind();
            $obj = $this->current();
            if ($obj) {
                if (!$this->reflection) {
                    $this->reflection = new \ReflectionClass($this->current());
                }

                if ($this->columMap === null) {
                    $this->columMap = [];
                    foreach ($this->reflection->getProperties() as $property) {
                        $this->columMap[$property->getName()] = $property;
                    }
                }
            }
        }


        $this->rewind();
        $arr = [];
        while ($this->valid()) {
            if ($columName && !empty($this->columMap[$columName])) {
                $obj = $this->current();
                /**
                 * @var \ReflectionProperty $test
                 */
                $this->columMap[$columName]->setAccessible(true);
                $arr[] = $this->columMap[$columName]->getValue($obj);
            } else {
                $arr[] = $this->current();
            }

            $this->next();
        }

        return $arr;
    }
1130681
public function getColumn($columnName)
    {
        return isset($this->_columns[$columnName]) ? $this->_columns[$columnName] : null;
    }
815521
public function __($column, $enumName = null, $locale = null)
    {
        $enumName = $enumName ?: $column;

        $value = app('enum')->value($this->attribute($column), $enumName);
        $key = implode('.', ['enums', $column, $value]);

        if (app('translator')->has($key)) {
            return app('translator')->trans($key, [], $locale);
        }

        return $value;
    }
884045
protected function getEnumOptions($tableColumn)
    {
        $type = $tableColumn['type'];

        if (starts_with($type, 'enum(') && ends_with($type, ')')) {
            return explode("','", trim(substr($type, strlen('enum('), -1), "'"));
        }

        return [];
    }
690727
public function getColumnNames($tableName)
    {
        $colNames = array();
        foreach ($this->tableColumnTypes[$tableName] as $colName => $colType) {
            if ($colType['is_virtual']) {
                $this->dumpSettings['complete-insert'] = true;
                continue;
            } else {
                $colNames[] = "`${colName}`";
            }
        }
        return $colNames;
    }
1323650
public function getColNames()
    {
        if (count($this->colNames) != count($this->colModel)) {
            throw new \InvalidArgumentException('The number of colNames is not equal to the number of colModel');
        } 
        return $this->colNames;
    }
984121
private function columnToArray($fieldName, Column $column)
    {
        $mapping = array(
            'fieldName' => $fieldName,
            'type'      => $column->type,
            'scale'     => $column->scale,
            'length'    => $column->length,
            'unique'    => $column->unique,
            'nullable'  => $column->nullable,
            'precision' => $column->precision
        );

        if ($column->options) {
            $mapping['options'] = $column->options;
        }

        if (isset($column->name)) {
            $mapping['columnName'] = $column->name;
        }

        if (isset($column->columnDefinition)) {
            $mapping['columnDefinition'] = $column->columnDefinition;
        }

        return $mapping;
    }
768448
protected function getOptionEnumValue(array $attributes, array $columnData): array
    {
        $match = null;
        $pattern = '/enum\((.*)\)/';
        if (preg_match($pattern, $columnData['COLUMN_TYPE'], $match) === 1) {
            $values = str_getcsv($match[1], ',', "'", '\\');
            $attributes['values'] = $values;
        }

        return $attributes;
    }
920258
public function getCellDataForColumnName($columnName)
    {
        return Extractor::extract(
            $this->_data,
            $this->_dataGrid->getColumn($columnName)->getCellAccessor()
        );
    }
1137348
public function getColumnValues($column)
    {
        $values = array();
        foreach ($this as $item) {
            /** @var Aoe_Scheduler_Model_Job $item */
            $values[] = $item->getDataUsingMethod($column);
        }
        return $values;
    }
243731
public static function getEnumValues($modelName, $enumFieldName)
    {
        $schema = SolutionSchema::getModelSchema($modelName);
        $enum = $schema->getColumns()[$enumFieldName];
        return $enum->enumValues;
    }