Returns an option's value. Facade of OptionCollection.

@param $query string An option's name or alias

@return mixed
504493
final public function option($query)
    {
        try {
            $option = $this->options->find($query);
            $value  = $option->getValue();

        } catch (ObjectDoesNotExistException $e) {
            $value = false;
        }

        return $value;
    }
979909
public static function getOptionValues($filter = array())
    {
        $filter = Filter::create($filter);
        return self::getCollection('/options/values' . $filter->toQuery(), 'OptionValue');
    }
941500
public function scopeExtrasWithValues($query, $model)
    {
        $modelSlug = $model ? getModelSlug($model) : false;
        return $query->with([
            'extras' => function($query) use($model,$modelSlug)
            {
                if ( ! $model ) return $query;

                return $query->with([
                    "{$modelSlug}s" => function($query) use($model,$modelSlug)
                    {
                        return $query->wherePivot("{$modelSlug}_id",$model->id);
                    }
                ]);
            }
        ]);
    }
908669
private function filterQuery($query)
    {
        if (! empty($query) && strpos($query, '?') === 0) {
            $query = substr($query, 1);
        }

        $parts = explode('&', $query);
        foreach ($parts as $index => $part) {
            list($key, $value) = $this->splitQueryValue($part);
            if ($value === null) {
                $parts[$index] = $this->filterQueryOrFragment($key);
                continue;
            }
            $parts[$index] = sprintf(
                '%s=%s',
                $this->filterQueryOrFragment($key),
                $this->filterQueryOrFragment($value)
            );
        }

        return implode('&', $parts);
    }
720780
public function &getList($query)
    {
        $_result = array();
        $_ret = $this->execute($query);
        if ( $_ret != false ) {

            while ( ($_rows = $_ret->fetch(PDO::FETCH_ASSOC)) != false )
                $_result[]  = $_rows;
        }
        return $_result;
    }
1080280
private function getQueryOptions(/* $key, ... */)
    {
        return array_filter(
            array_intersect_key($this->query, array_flip(func_get_args())),
            function($value) { return $value !== null; }
        );
    }
41677
public function queryVector($query, $options = array())
    {
        return $this->queryArray($query, $options,
            function(\PDOStatement $statement) { return $statement->fetchAll(\PDO::FETCH_COLUMN, 0); });

    }
515996
public function search($query)
  {
    $content = $query->getBridgeJson($this->clientKey);

    return $this->query($this->bridgeUrl, $content, self::RESULTS_CLASS);
  }
1193907
public function findSlugForFilterData(Query $query, array $options)
    {
        if (!isset($options['request']) || get_class($options['request']) !== ServerRequest::class) {
            user_error('The request query option must exist and must be of type Cake\Http\ServerRequest.');
        }

        if (!isset($options['filterData'])) {
            user_error('No filterData option provided.');
        }

        /** @var ServerRequest $request */
        $request = $options['request'];
        $filterData = $options['filterData'];

        return $query
            ->select($this->getAlias() . '.slug')
            ->where([
                $this->getAlias() . '.controller' => $request->getParam('controller'),
                $this->getAlias() . '.action' => $request->getParam('action'),
                $this->getAlias() . '.filter_data' => $this->_encodeFilterData($filterData)
            ])
            ->where($this->_pluginCondition($request));
    }
159240
public static function get($url, $query = [], $options = [])
    {
        $options['query'] = $query;
        return self::doRequest('get', $url, $options);
    }
1130940
protected function getValueFromRelationQuery($query)
    {
        $query = $this->prepareRelationQuery($query);

        return $this->getValueFromModel(
            $query->first()
        );
    }
331947
public function search($query = '', $options = null)
    {
        $this->setOptionsAndQuery($options, $query);

        $query = $this->getQuery();
        $path = $this->getPath();

        $params = $this->getOptions();

        // Send scroll_id via raw HTTP body to handle cases of very large (> 4kb) ids.
        if ('_search/scroll' == $path) {
            $data = [self::OPTION_SCROLL_ID => $params[self::OPTION_SCROLL_ID]];
            unset($params[self::OPTION_SCROLL_ID]);
        } else {
            $data = $query->toArray();
        }

        $response = $this->getClient()->request(
            $path,
            Request::GET,
            $data,
            $params
        );

        return $this->_builder->buildResultSet($response, $query);
    }
467885
private function getCommand($query): MongoCommand
    {
        try {
            $command = new MongoCommand($query);
        } catch (InvalidArgumentException $e) {
            new Exception('WriteConcern could not to be initiated');
        }
        return $command;
    }
481429
public function collect($query, $options = [])
  {
    if (!$this->getNyaa()->canProvideAllData()) {
        return $this->collectRecursive($query, $options);
    }


    return $this->collectSingleFeed($query, $options);
  }
812864
public function withQuery(string $query): URI
    {
        $result = clone $this;
        $result->query = $this->filterQuery($query);

        return $result;
    }
413071
final public function queryArray(string $query)
    {
        $result = $this->queryResult($query);
        if (false === $result) {
            return false;
        }

        $return = [];
        while (false !== $row = $result->fetchRow()) {
            $return[] = $row;
        }
        return $return;
    }
1323151
private function _query($query)
    {
        if ($this->encrypted) {
            return OneLogin_Saml2_Utils::query($this->decryptedDocument, $query);
        } else {
            return OneLogin_Saml2_Utils::query($this->document, $query);
        }
    }