Returns map of the all registered values in the 'key' => 'value' pairs.
The 'key' equal to database value and the 'value' equal to humanized value.

@return array
186124
public function getMap()
    {
        $result = [];

        foreach ($this->getConstants() as $dbName => $dbValue) {
            if (0 === strpos($dbName, self::PREFIX_DB)) {
                $result[$dbValue] = $this->getAppropriateConstValue(self::PREFIX_DB, $dbName);
            }
        }

        return $result;
    }
669185
function getPrimaryKeyValues() {
		$arr = array();
		$pks = static::$_primaryKeys;

		foreach ($pks as &$pk) {
			$arr[] = $this->{"get$pk"}();
		}

		return $arr;
	}
29239
public function getMap()
    {
        if (isset($this->raw->map)) {
            $map = array();

            foreach ((array) $this->raw->map as $item) {
                $processed = array();

                foreach ($item as $match => $replace) {
                    $processed[Path::canonical($match)] = Path::canonical($replace);
                }

                if (isset($processed['_empty_'])) {
                    $processed[''] = $processed['_empty_'];

                    unset($processed['_empty_']);
                }

                $map[] = $processed;
            }

            return $map;
        }

        return array();
    }
6998
public function getAllKeys()
    {

        // initialize the array with keys of all attributes
        $keys = array();

        // prepare the pattern to filter the attributes
        $pattern = sprintf('%s-*', $this->getSerial());

        // prepare the array with the attribute keys
        foreach (array_keys((array) $this) as $key) {
            if (fnmatch($pattern, $key)) {
                $keys[] = $this->unmaskKey($key);
            }
        }

        // return the attribute keys
        return $keys;
    }
162017
public static function values()
    {
        $values = array();
        foreach (static::toArray() as $key => $value) {
            $values[$key] = new static($value);
        }
        return $values;
    }
426551
protected static function determineKeyToValueMap(): array
    {
        // default behavior is to use all public constants of the current class
        $keyToValueMap = [];

        foreach ((new \ReflectionClass(static::class))->getReflectionConstants() as $constant) {
            if ($constant->isPublic()) {
                $keyToValueMap[$constant->name] = $constant->getValue();
            }
        }

        return $keyToValueMap;
    }
176106
protected function generateSortedKeysMap(): array
    {
        $sortedKeysMap = [];

        $startKeys = $this->startKeys;
        $middleKeys = $this->middleKeys;
        $endKeys = $this->endKeys;
        $beforeKeys = $this->beforeKeys;
        $afterKeys = $this->afterKeys;
        $flattenFunction = function ($value, $key, $step) use (&$sortedKeysMap, &$beforeKeys, &$afterKeys, &$flattenFunction) {
            if (isset($beforeKeys[$value])) {
                array_walk_recursive($beforeKeys[$value], $flattenFunction, $step);
                unset($beforeKeys[$value]);
            }
            $sortedKeysMap[$step][] = $value;
            if (isset($afterKeys[$value])) {
                array_walk_recursive($afterKeys[$value], $flattenFunction, $step);
                unset($afterKeys[$value]);
            }
        };

        // 1st step: collect regular keys and process before / after if keys occurred
        array_walk_recursive($startKeys, $flattenFunction, 0);
        array_walk_recursive($middleKeys, $flattenFunction, 2);
        array_walk_recursive($endKeys, $flattenFunction, 4);

        // 2nd step: process before / after leftovers for unmatched keys
        array_walk_recursive($beforeKeys, $flattenFunction, 1);
        array_walk_recursive($afterKeys, $flattenFunction, 3);

        ksort($sortedKeysMap);
        return $sortedKeysMap;
    }
671243
public function keys()
    {
        $map = new Map;
        foreach (array_keys($this->array) as $hash) {
            $map[] = $this->hash_to_key($hash);
        }
        return $map;
    }
417633
public function getAllMetadata()
    {
        if (!$this->initialized) {
            $this->initialize();
        }

        $mappings = array();
        foreach ($this->driver->getAllClassNames() as $className) {
            $mappings[] = $this->getMetadataFor($className);
        }

        return $mappings;
    }
567158
public static function getFromDB( )
    {
        $result = array();
        $objDB = \Database::getInstance( );

        $tables = $objDB->listTables( null, true );
        if( empty($tables) ) {
            return $result;
        }

        foreach( $tables as $table ) {
            $keys = array();
            $fields = $objDB->listFields($table, true);

            foreach( $fields as $field ) {
                $name = $field['name'];
                $field['name'] = '`' . $field['name'] . '`';

                if( in_array(strtolower($field['type']), array('text', 'tinytext', 'mediumtext', 'longtext')) && isset($fields[$name]) ) {
                    $keys[$name] = 'FULLTEXT ';
                }

                //--- Tabellenspalten definieren ---
                if( $field['type'] != 'index' ) {
                    unset($field['index']);

                    // Field type
                    if( isset($field['length']) && ($field['length'] != '') ) {
                        $field['type'] .= '(' . $field['length'] . ((isset($field['precision']) && $field['precision'] != '') ? ',' . $field['precision'] : '') . ')';

                        unset( $field['length'] );
                        unset( $field['precision'] );
                    }

                    // Variant collation
                    if( ($field['collation'] != '') && ($field['collation'] != $GLOBALS['TL_CONFIG']['dbCollation']) ) {
                        $field['collation'] = 'COLLATE ' . $field['collation'];
                    }
                    else {
                        unset( $field['collation'] );
                    }

                    // Default values
                    if( in_array(strtolower($field['type']), array('text', 'tinytext', 'mediumtext', 'longtext', 'blob', 'tinyblob', 'mediumblob', 'longblob')) || stristr($field['extra'], 'auto_increment') || ($field['default'] === null) || (strtolower($field['null']) == 'null') ) {
                        unset( $field['default'] );
                    }
                    // Date/time constants (see #5089)
                    else if( in_array(strtolower($field['default']), array('current_date', 'current_time', 'current_timestamp')) ) {
                        $field['default'] = "default " . $field['default'];
                    }
                    // Everything else
                    else {
                        $field['default'] = "default '" . $field['default'] . "'";
                    }

                    unset( $field['origtype'] );
                    $result[$table]['TABLE_FIELDS'][$name] = trim( implode( ' ', $field ) );
                }

                //--- Index-Einträge ---
                if( isset($field['index']) && !empty($field['index_fields']) ) {
                    $index_fields = '`' . implode( '`, `', $field['index_fields'] ) . '`';
                    $index_fields = str_replace(array('(', ')`'), array('`(', ')'), $index_fields );

                    switch( $field['index'] ) {
                        case 'UNIQUE':  if( $name == 'PRIMARY' ) {
                                            $result[$table]['TABLE_CREATE_DEFINITIONS'][$name] = 'PRIMARY KEY  ('.$index_fields.')';
                                        }
                                        else {
                                            $result[$table]['TABLE_CREATE_DEFINITIONS'][$name] = 'UNIQUE KEY `'.$name.'` ('.$index_fields.')';
                                        }
                                        break;

                        default:        $result[$table]['TABLE_CREATE_DEFINITIONS'][$name] = (isset($keys[$name]) ? $keys[$name] : '') . 'KEY `'.$name.'` ('.$index_fields.')';
                                        break;
                    }
                    unset( $field['index_fields'] );
                    unset( $field['index'] );
                }
            }
        }

        // Table status
        $objStatus = $objDB->execute( 'SHOW TABLE STATUS' );
        while( $zeile = $objStatus->fetchAssoc() ) {
            $result[$zeile['Name']]['TABLE_OPTIONS'] = ' ENGINE=' . $zeile['Engine'] . ' DEFAULT CHARSET=' . substr($zeile['Collation'], 0, strpos($zeile['Collation'],"_"));

            if( $zeile['Auto_increment'] != '' ) {
                $result[$zeile['Name']]['TABLE_OPTIONS'] .= ' AUTO_INCREMENT=' . $zeile['Auto_increment'];
            }
        }

        return $result;
    }
750919
protected function getAllForeignKeysOrderedByTable()
    {
        $results = $this->dataBase->getAllForeignKeys();
        $results = ArrayHelpers::orderArrayByValue($results, 'TABLE_NAME');

        return $results;
    }
430636
public function getKeys() {
        $keys = [];
        foreach($this->arrays as $array) {
            $keys = array_merge($keys, $array instanceof \ArrayAccess ? $array->getKeys():array_keys($array));
        }
        return array_unique($keys);
    }
1013719
public function asArray()
    {
        $array = [];

        foreach ($this as $key => $val) {
            if ($val instanceof self) {
                $val = $val->asArray();
            }
            $array[$key] = $val;
        }

        return $array;
    }
1298730
public function toArray()
    {
        $values = $this->values;
        return array_map(
            function ($cursor) use ($values) {
                return $values[$cursor];
            },
            $this->nameToCursor
        );
    }
1038609
public function get_key_list() {
        $keys = array();
        foreach ($this->collection as $node) {
            $keys[] = $node->key;
        }
        return $keys;
    }
551799
public function getWritableValues(): array
    {
        $result = array();

        foreach ($this->_definition as $key => $value) {
            if ($this->isWritable($key)) {
                $result[$key] = $this->$key;
            }
        }

        return $result;
    }
1321214
public function getKeys()
    {
        if ($this->hasCompositeKey()) {
            $key = [];

            foreach ($this->compositeKey as $name) {
                $key[$name] = $this->getAttribute($name);
            }

            return $key;
        }

        $name = $this->getKeyName();

        return [$name => $this->getAttribute($name)];
    }