Forward a result value as array key

@param string|bool        $key
@return self The current query builder.
439137
public function forwardKey($key = true)
    {
        if ($key === false) {
            $this->forwardKey = false;
        } elseif ($key === true) {
            $this->forwardKey = \ClanCats::$config->get('database.default_primary_key', 'id');
        } else {
            $this->forwardKey = $key;
        }

        return $this;
    }
253179
public function key($key)
    {
        $this->key = self::hkdf($key, 'KeyForEncryption');
        $this->authentication = self::hkdf($key, 'KeyForAuthentication');

        return $this;
    }
995813
protected function _removeKey($key)
    {
        $keys = $this->get('__stored_keys__', []);
        if (in_array($key, $keys)) {
            $reverse = array_flip($keys);
            unset($reverse[$key]);
            $this->set('__stored_keys__', array_keys($reverse));
        }
        return $this;
    }
110291
public function orderBy($key, $direction = \Parable\ORM\Query::ORDER_ASC)
    {
        $this->orderBy = ['key' => $key, 'direction' => $direction];
        return $this;
    }
898674
public static function _queryToObjects ($query, $key = FALSE)
	{
		$query->execute ();
		return static::_arrayToObjects ($query->fetchAll (\PDO::FETCH_ASSOC), $key);
	}
75183
public function newFromKey($key)
    {
        $scope = $this->get($key);
        if ($this->checkRefs && is_array($scope)) {
            $this->replaceRefs($key, $scope);
        }
        $result = new static($scope);

        return $result;
    }
399427
public function setKey($key) {
        if(!$this->setModified('key', $key)->isModified()) {
            return $this;
        }
		$this->key = $key;
		return $this;
    }
907355
public function touch($key)
    {
        if (! isset($this->files[$key])) {
            if (! Utilities::dirExists($this->dir, true)) {
                return false;
            }
            $this->files[$key] = new PhpStore($this->dir . '/' . $key . '.php');
        }
        return $this->files[$key]->touch();
    }
669691
public function &__get($key)
    {
        $return = $this->get($key);

        if (\is_array($return)) {
            return static::create($return, $this->iteratorClass, false);
        }

        return $return;
    }
713501
public function getKey($key)
    {
        $tokens = explode('.', $key);


        $first = array_shift($tokens);
        $first = str_replace('POINT', '.', $first);

        $that = $this;

        $value = $that[$first];

        foreach($tokens as $k) {
            $k = str_replace('POINT', '.', $k);
            if (false === isset($value[$k])) {
                return null;
            }
            $value = $value[$k];
        }

        return $value;
    }
79763
public function alias($key) {
        if (count($this->from) == 1) {
            $this->from = array($key => current($this->from));
        }
        return $this;
    }
977460
public function column($key)
    {
        $result = array_column($this->all(), $key);

        if (empty($result)) {
            $this->each(function ($item) use (&$result, $key) {
                array_push($result, $item->{$key});
            });
        }

        return new static($result);
    }
756116
public function withKey($key)
    {
        $this->lastKey = $key;
        $this->keys[$key] = null;

        return $this;
    }
347567
public function setKey($key)
    {
        $arr = $this->parseKey($key);
        $this->key = $arr['key'];
        $this->identifier = $arr['identifier'];
        $this->prefix = $arr['prefix'];

        return $this;
    }
26379
protected function _addKey($key)
    {
        if ($key == '__stored_keys__') {
            return $this;
        }

        $keys = $this->get('__stored_keys__', []);
        if (!in_array($key, $keys)) {
            array_push($keys, $key);
        }
        $this->set('__stored_keys__', $keys, 24*60*60);
        return $this;
    }
888825
public function addItemKey(string $table, array $key): self
    {
        $this->queue[] = ['table' => $table, 'key' => $key];
        return $this;
    }
476172
protected function _hashKey( $key )
    {
        if ( null !== $this->_keyHashCallback && is_callable( $this->_keyHashCallback ) )
        {
            $_arguments = func_get_args();

            return call_user_func_array( $this->_keyHashCallback, $_arguments );
        }

        return $key;
    }