Cake\ElasticSearch\Type::callFinder PHP Метод

callFinder() публичный Метод

Calls a finder method directly and applies it to the passed query, if no query is passed a new one will be created and returned
public callFinder ( string $type, Query $query, array $options = [] ) : Query
$type string name of the finder to be called
$query Query The query object to apply the finder options to
$options array List of options to pass to the finder
Результат Query
    public function callFinder($type, Query $query, $options = [])
    {
        $query->applyOptions($options);
        $options = $query->getOptions();
        $finder = 'find' . ucfirst($type);
        if (method_exists($this, $finder)) {
            return $this->{$finder}($query, $options);
        }
        throw new \BadMethodCallException(sprintf('Unknown finder method "%s"', $type));
    }