Returns an array with the keys

@return array
8019
public static function toKeysArray(ResultIterator $iterator)
    {
        $keys = array();
        foreach ($iterator as $result) {
            $keys[] = $result->getKey();
            
        }
        return $keys;
    }
13145
public function toArray()
    {
        $ret = [ ];
        foreach ($this as $key => $value) {
            $ret[ $key ] = $value;
        }
        return $ret;
    }
801167
public function keys()
    {
        $found = [];

        foreach ($this->findExpressions(['class' => KeyExpression::class]) as $expression) {
            // Make them unique
            $found["$expression"] = $expression;
        }

        return new StringList(array_keys($found));
    }
447847
public function toArray()
    {
        $result = array();
        foreach ($this as $key => $entity) {
            $result[$key] = $entity->toArray();
        }
        return $result;
    }
710162
public function asArray()
    {
        $fields = [
            '@type' => $this->type(),
            '@key'  => $this->key(),
        ];

        foreach ($this->fields as $name => $field) {
            $fields[$name] = $field->value;
        }

        return $fields;
    }
1096996
public function keySetObject()
    {
        $ranges = [];
        foreach ($this->ranges as $range) {
            $ranges[] = $range->keyRangeObject();
        }

        $set = [];

        if ($this->all) {
            $set['all'] = true;
        }

        if ($this->keys) {
            $set['keys'] = $this->keys;
        }

        if ($ranges) {
            $set['ranges'] = $ranges;
        }

        return $set;
    }
784259
protected function fetchPrimaryKeys(): array
    {
        $query = "SHOW INDEXES FROM {$this->driver->identifier($this->getName())}";

        $primaryKeys = [];
        foreach ($this->driver->query($query) as $index) {
            if ($index['Key_name'] == 'PRIMARY') {
                $primaryKeys[] = $index['Column_name'];
            }
        }

        return $primaryKeys;
    }
1096465
public function key()
    {
        switch ($this->flags & 0xF0) {
            default:
            case self::CURRENT_ARRAY:
                return [$this->lhs->key(), $this->rhs->key()];
            case self::CURRENT_LHS:
                return $this->lhs->key();
            case self::CURRENT_RHS:
                return $this->rhs->key();
            case self::CURRENT_0:
                return null;
        }
    }
187219
public function toArray()
    {
        $data = [];

        foreach ($this->keys() as $key) {
            $data[$key] = $this->offsetGet($key);
        }

        return $data;
    }
559452
public function keys()
    {

        $keys = new StringList();
        $url = $this->urlOrFail();

        if (!$this->filesystem->isDirectory($url)) {
            return $keys;
        }

        $fileExtension = $this->fileExtension();

        foreach ($this->filesystem->listDirectory($url) as $fileName) {

            if ($this->filesystem->extension($fileName) != $fileExtension) {
                continue;
            }

            if ($this->filesystem->isDirectory($fileName)) {
                continue;
            }

            $keys->append($this->keyOfFile($fileName));

        }

        return $keys;
    }
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;
    }
930658
public function getKeys()
    {
        if ($this->_keys === null) {
            $this->_keys = $this->getResolvedPathInfo($this->request)->resolvedValues;
        }
        
        return $this->_keys;
    }
480846
public function toArray()
    {
        $methods = array();
        foreach ($this->getMethods() as $key => $method) {
            $methods[$key] = $method->toArray();
        }
        return $methods;
    }
59962
public function toArray()
    {
        $a = array();
        foreach ($this->value as $key => $value) {
            $a[$key] = $value->toArray();
        }
        return $a;
    }
733156
public function getAll () : array
    {
        return array_map(
            function (string $key)
            {
                return $this->getType($key);
            },
            array_keys($this->types)
        );
    }
1321243
public function toArray()
    {
        return [
            'id' => $this->getId(),
            'key' => $this->getKey(),
            'name' => $this->getName(),
            'meta' => $this->getMeta(),
            'keywords' => $this->getKeywords(),
            'defaultLocale' => $this->getDefaultLocale(),
            'creator' => $this->getCreator(),
            'changer' => $this->getChanger(),
            'created' => $this->getCreated(),
            'changed' => $this->getChanged(),
        ];
    }
402265
public function toArray()
    {
        $keys = $this->redis->hKeys($this->key);
        $result = array();
        foreach ($keys as $key) {
            $result[$key] = $this->offsetGet($key);
        }
        return $result;
    }