Retrieve all the keys.

@return array

@throws \Exception When an id is empty.
973547
public function getKeys()
    {
        /** @var \DOMNodeList $tmp */
        $transUnits = $this->getXPath()->query('/xliff:xliff/xliff:file/xliff:body/xliff:trans-unit');

        $result = array();

        if ($transUnits->length > 0) {
            /** @var \DOMElement $element */
            foreach ($transUnits as $element) {
                if (!$this->getAttribute($element, 'id')) {
                    throw new \Exception('Empty Id: ' . var_export($element, true));
                }
                $result[] = (string) $this->getAttribute($element, 'id');
            }
        }

        return $result;
    }
845657
public function fetchAll(): array
    {
        if (!$this->wasExecuted()) {
            $this->exec();
        }

        return $this->getAdapter()->getStatement()->fetchAll(PDO::FETCH_ASSOC);
    }
667982
public function all(): array
    {
        $out = [];
        foreach (parent::all() as $key => $props) {
            $out[$props['originalKey']] = $props['value'];
        }

        return $out;
    }
308931
public function get(): array
    {
        try {
            $query = $this->apply($this->database->getTablePrefixer());
            $compiled = $this->database->getGrammar()->compileSelect($query);
            return $this->database->select($compiled->getSQL(), $compiled->getBindings());
        } catch (\Throwable $exception) {
            return $this->handleException($exception);
        }
    }
271523
public function get_key($keyid)
    {
        $list = $this->list_keys($keyid);

        if (is_array($list)) {
            return $list[key($list)];
        }

        // error
        return $list;
    }
824579
public static function getIdList(): array
    {
        $list = [];
        foreach (self::getAll() as $tree) {
            $list[$tree->id] = $tree->title;
        }

        return $list;
    }
998992
protected function getIDList() : array
    {
        //Get element ID list from cache
        $arElementIDList = $this->getIDListFromCache();
        if (!empty($arElementIDList) && is_array($arElementIDList)) {
            return $arElementIDList;
        }

        $arElementIDList = $this->getIDListFromDB();
        $this->saveIDList($arElementIDList);

        return $arElementIDList;
    }
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;
    }
288855
public function getKeys()
    {
        $keys = array_keys($this->cache) + array_keys($this->factories);
        return array_unique($keys);
    }
831787
protected function getKeyAsArray()
    {
        $result = [];
        if ( ! empty( $this->compositeKey )) {
            foreach ($this->compositeKey as $key) {
                $result[$key] = $this->{$key};
            }
        } else {
            $result[$this->getKeyName()] = $this->getKey();
        }

        return $result;
    }
44643
public function __getKey()
    {
        $rule = ModelManager::getKeyRule($this);
        $result = $rule->rule;
        foreach($rule->paramNames as $paramName)
        {
            if(!isset($this[$paramName]))
            {
                throw new \Exception(sprintf('__getKey param %s does not exists', $paramName));
            }
            $result = str_replace('{' . $paramName . '}', $this[$paramName], $result);
        }
        return $result;
    }
1168775
protected function collectForeignKeys()
    {
        $keys = [];

        foreach ($this->info->relations as $relation) {

            if ( ! in_array(
                $relation->type,
                [ RelationType::BELONGS_TO, RelationType::MORPH_TO, RelationType::BELONGS_TO_THROUGH ]
            )) {
                continue;
            }

            $keys = array_merge($keys, $relation->foreign_keys);
        }

        return $keys;
    }
808145
public function getNames()
    {
        if($this->isKeycacheInvalid())
        {
            $this->regenerateKeyCache();
        }
        if(is_array($this->__keycacheindex))
        {
            return $this->__keycacheindex;
        }
        return array();
    }
717372
private function _getKeyIdMap(): array
    {
        // lazily build mapping
        if (!isset($this->_keyIdMap)) {
            $this->_keyIdMap = array();
            foreach ($this->_certs as $cert) {
                $id = self::_getCertKeyId($cert);
                if (!isset($this->_keyIdMap[$id])) {
                    $this->_keyIdMap[$id] = array();
                }
                array_push($this->_keyIdMap[$id], $cert);
            }
        }
        return $this->_keyIdMap;
    }
781300
protected function getShardIds(): array
    {
        $key = $this->getStreamName() . '.shard_ids';

        if ($this->cache->has($key)) {
            return $this->cache->get($key);
        }

        $res = $this->getClient()->describeStream(['StreamName' => $this->getStreamName()]);
        $shard_ids = $res->search('StreamDescription.Shards[].ShardId');
        // Cache shard_ids for a day as overuse of the describeStream
        // resource results in LimitExceededException error.
        $this->cache->set($key, $shard_ids, 86400);

        return $shard_ids;
    }
600641
public function getArrayKeys()
    {
        $returnValue = [];

        foreach (array_keys($this->getArrayCopy()) as $key) {
            if ($key != '_type') {
                $returnValue[] = $key;
            }
        }

        return $returnValue;
    }
257431
public function all()
    {
        $results = [];
        foreach ($this->index->getKeys() as $key) {
            $result = $this->get($key);
            $results[key($result)] = current($result);
        }

        return $results;
    }