@param string|null $query
@param int $page
@param Request\Search\PersonSearchRequest|Request\Search\PersonSearchRequest|null $request

@return Model\Search\PersonSearch
@throws ParserException
181460
public function PersonSearch(
        ?string $query,
        int $page = 1,
        ?Request\Search\PersonSearchRequest $request = null
    ): Model\Search\PersonSearch {
        return $this->myanimelist->getPersonSearch(
            null !== $request
                ? $request
                ->setQuery($query)
                ->setPage($page)
                : new Request\Search\PersonSearchRequest($query, $page)
        );
    }
329238
public function search($query)
    {
        if ($this->hasSearch()) {

            $search = $this->search;

            // If it's a anonymous function
            if (!is_string($search) && is_callable($search)) {
                call_user_func($search, $this, $query);
            }
        }

        return $this;
    }
1294221
public function search($query)
    {
        if (!$this->searchEnabled) {
            throw new SdkException("Search is not available for " . $this->getResourceName());
        }

        if (!is_array($query)) $query = array('query' => $query);

        $url = $this->generateUrl($query, 'search');

        return $this->get(array(), $url);
    }
705270
public function search($query)
    {
        $classes = $this->getClassMetadata();
        return $this->_sm->getUnitOfWork()->loadCollection($classes, $query);
    }
873648
public function query($query = NULL) {
        if (isset($query)) {
            $this->setQuery(self::cleanQuery($query));
            return $this;
        }
        return $this->getQuery();
    }
343867
public function lists($page = 1, $query = null, array $params = [])
    {
        $this->listPage = $page;
        $this->listQuery = $query;
        $this->listParams = $params;

        return $this->getList();
    }
720074
public function searchPerson($query, PersonSearchQuery $parameters, array $headers = [])
    {
        $data = $this->getApi()->searchPersons($query, $this->getParameters($parameters), $headers);

        return $this->getPeopleFactory()->createResultCollection($data);
    }
694091
protected function exec($query)
    {
        try {
            Connect::getConn()->exec($query);
        } catch (Exception $e) {
            static::$response["status"] = "error";
            static::$response["response"] = $e->getMessage();
            static::$response["code"] = $e->getCode();

            return static::terminate(static::$response);
        }
        return null;
    }
735910
public function search($query) {
        global $CFG, $DB;
        if ($result = parent::search($query)) {
            return $result;
        }

        $found = false;
        if ($modules = $DB->get_records('modules')) {
            foreach ($modules as $module) {
                if (!file_exists("$CFG->dirroot/mod/$module->name/lib.php")) {
                    continue;
                }
                if (strpos($module->name, $query) !== false) {
                    $found = true;
                    break;
                }
                $strmodulename = get_string('modulename', $module->name);
                if (strpos(core_text::strtolower($strmodulename), $query) !== false) {
                    $found = true;
                    break;
                }
            }
        }
        if ($found) {
            $result = new stdClass();
            $result->page     = $this;
            $result->settings = array();
            return array($this->name => $result);
        } else {
            return array();
        }
    }
1312722
public function scopePaginateFilter($query, $perPage = null, $columns = ['*'], $pageName = 'page', $page = null)
    {
        $perPage = $perPage ?: config('eloquentfilter.paginate_limit');
        $paginator = $query->paginate($perPage, $columns, $pageName, $page);
        $paginator->appends($this->filtered);

        return $paginator;
    }
957959
public function indexAction($page = 1)
    {
        // When the user inserts a numeric value, assume they want to find the entity by ID.
        $session = $this->get('session');
        $search  = $this->request->get('search', $session->get('mautic.'.$this->getSessionBase().'.filter', ''));
        if (isset($search) && is_numeric(trim($search))) {
            $search          = '%'.trim($search).'% OR ids:'.trim($search);
            $query           = $this->request->query->all();
            $query['search'] = $search;
            $this->request   = $this->request->duplicate($query);
            $session->set('mautic.'.$this->getSessionBase().'.filter', $search);
        } elseif (false === strpos($search, '%') && strlen($search) > 0 && false === strpos($search, 'OR ids:')) {
            $search          = '%'.trim($search, ' \t\n\r\0\x0B"%').'%';
            $search          = strpos($search, ' ') ? '"'.$search.'"' : $search;
            $query           = $this->request->query->all();
            $query['search'] = $search;
            $this->request   = $this->request->duplicate($query);
            $session->set('mautic.'.$this->getSessionBase().'.filter', $search);
        }

        return parent::indexStandard($page);
    }
695394
public function fetch($query, $page = 1, $maxPerPage = 10)
    {
        if (!$query instanceof PagerToken) {
            throw new \Exception('Not supported, must give a PagerToken');
        }

        $offset = ($page - 1) * $maxPerPage;
        $maxPerPage = $maxPerPage - 1; // due to redis

        $ids = $this->client->zRevRange($query->key, $offset, ($offset + $maxPerPage));

        return $this->findActionsForIds($ids);
    }
918917
public function setQuerystring(string $query = null) : self
    {
        if (is_null($query)) {
            $this->uri['query'] = [];
        } else {
            $this->uri['query'] = $this->parseStr($query);
        }

        return $this;
    }
1196804
public function scopeSearch($query, $request)
    {
        if (! empty($request->s)) {
            $query->where('first_name', 'like', '%' . $request->s . '%')
                    ->orWhere('last_name', 'like', '%' . $request->s . '%')
                    ->orWhere('email', 'like', '%' . $request->s . '%')
                    ->orWhere('phone', 'like', '%' . $request->s . '%');
        }

        if (isset($request->status) && $request->status === 'trashed') {
            $query->onlyTrashed();
        }

        return $query;
    }
144742
public function index($page = null)
    {
        $url = sprintf('buckets/%d/vaults/%d/documents.json', $this->bucket, $this->parent);

        $documents = $this->client->get($url, [
            'query' => [
                'page' => $page,
            ],
        ]);

        return $this->indexResponse($documents, Document::class);
    }
170708
public function post($query, Array $parameters = [], $autoParser = true) {
        curl_setopt_array($this->resource, [
            CURLOPT_POSTFIELDS => array_merge($parameters, [
                self::PARAMETER_QUERY => $query,
                self::PARAMETER_APIKEY => $this->apiKey
            ])
        ]);

        $dom = new \DOMDocument;
        $ret = curl_exec($this->resource);
        if (!$autoParser) return $ret;
        $dom->loadXML($ret);
        static::assert($dom);
        return $dom;
    }
332589
protected function exec($query)
    {
        if (!$query) {
            throw new Exceptions\RPCException("Empty query.");
        }
        
        $url = sprintf("http://%s:%d", $this->conf["host"], $this->conf["port"]);
        $web = $this->getWebClient();
        $web->setMethod(HttpMethods::POST);
        $web->addHeader("Content-Type", "application/json");
        $web->setBasicAuth($this->conf["user"], $this->conf["pass"]);
        $web->setData($query);
        $response    = $web->request($url);
        $status_code = $response->getCode();
        
        if (isset(self::$exceptions[$status_code])) {
            $error = $this->getResponseError($response, $status_code);
            throw new self::$exceptions[$status_code](
                $error["message"],
                $error["code"]
            );
        }

        return $response;
    }