@param Request\Search\CharacterSearchRequest $request

@return Model\Search\CharacterSearch
@throws BadResponseException
@throws ParserException
487341
public function getCharacterSearch(Request\Search\CharacterSearchRequest $request): Model\Search\CharacterSearch
    {
        $crawler = $this->ghoutte->request('GET', $request->getPath());
        try {
            $parser = new Parser\Search\CharacterSearchParser($crawler);

            return $parser->getModel();
        } catch (\Exception $e) {
            throw ParserException::fromRequest($request, $e);
        }
    }
445558
public function getMangaCharacters(Request\Manga\MangaCharactersRequest $request): array
    {
        $crawler = $this->ghoutte->request('GET', $request->getPath());
        try {
            $parser = new Parser\Manga\CharactersParser($crawler);

            return $parser->getCharacters();
        } catch (\Exception $e) {
            throw ParserException::fromRequest($request, $e);
        }
    }
861802
public function buildSearch(SearchRequest $request, $filters = null)
    {
        $search = new Search();

        /** @var FilterInterface[] $filters */
        $filters = $filters ? $filters : $this->all();
        foreach ($filters as $name => $filter) {
            $filter->modifySearch($search, $request->get($name), $request);
        }

        return $search;
    }
169683
public function getSearchCharactersData(Request $request)
    {

        $characters = $this->doSearchCharacters();

        return DataTables::of($characters)
            ->editColumn('name', function ($row) {

                $character = CharacterInfo::find($row->character_id);

                return view('web::partials.character', compact('character'));
            })
            ->editColumn('corporation_id', function ($row) {

                $corporation = CorporationInfo::find($row->corporation_id);

                return view('web::partials.corporation', compact('corporation'));
            })
            ->rawColumns(['name', 'corporation_id'])
            ->make(true);

    }
745034
private static function getCacheName(Request $request) {

        return md5((string)$request->getMethod().(string)$request->getUri());

    }
842327
public function getTopCharacters(Request\Top\TopCharactersRequest $request): array
    {
        $crawler = $this->ghoutte->request('GET', $request->getPath());
        try {
            $parser = new Parser\Top\TopCharactersParser($crawler);

            return $parser->getTopCharacters();
        } catch (\Exception $e) {
            throw ParserException::fromRequest($request, $e);
        }
    }
1141790
public function parseQuery($request)
    {
        list($endpoint, $params) = explode('?', $request['request']['uri']);

        $request['endpoint'] = $endpoint;
        $request['params'] = $params;
        $request['method'] = $request['request']['method'];
        $request['raw_data'] = $request['request']['raw_data'];

        if (class_exists(VarCloner::class)) {
            $varCloner = new VarCloner();

            parse_str($params, $stub);
            $request['stub'] = Kernel::VERSION_ID >= 30200 ? $varCloner->cloneVar($stub) : $stub;
        }

        return $request;
    }
267625
protected function convertCase($request)
    {
        $inflector = new Inflector();
        switch ($this->defaultCaseFormat) {
            // assume camel case and should convert to snake
            case "snake":
                if (is_object($request)) {
                    $request = $inflector->objectPropertiesToSnake($request);
                } elseif (is_array($request)) {
                    $request = $inflector->arrayKeysToSnake($request);
                }

                break;

            // assume snake and should convert to camel
            case "camel":
                if (is_object($request)) {
                    $request = $inflector->objectPropertiesToCamel($request);
                } elseif (is_array($request)) {
                    $request = $inflector->arrayKeysToCamel($request);
                }
                break;
            default:
                break;
        }
        return $request;
    }
53073
public function parse(Request $request)
    {
        $content = $request->getContent();

        if (!empty($content) && self::HTTP_DELETE == $request->getMethod()) {
            throw new ParseException(self::ERROR_CONTENT_ON_DELETE);
        }

        $params = new Params;
        $params->path = $this->parsePath($request);
        $params->i18n = $this->parseI18n($request);
        $params->primaryType = $this->parsePrimaryType($request);
        $params->primaryClass = $this->getEntityClass($params->primaryType);
        $params->relationship = $this->parseRelationship($request, $params);
        $params->primaryIds
            = $this->parsePrimaryIds($request, $params->relationship);
        $params->relationshipIds
            = $this->parseRelationshipIds($request);
        $params->locale = $this->localeNegotiator->negotiate($request);

        if (!empty($this->translatableListener) && !empty($params->locale)) {
            $params->translatable = TRUE;
            $this->translatableListener
                ->setTranslatableLocale($params->locale);
        } else {
            $params->translatable = FALSE;
        }

        if ($request->query->has('include')) {
            $params->include = $this->parseInclude($request);
        }

        if ($request->query->has('fields')) {
            $params->sparseFields
                = $this->parseSparseFields($request, $params->primaryType);
        }

        if ($request->query->has('page')) {
            $params->pagination
                = $this->paginationParser->parse($request, $params);
        }

        $params->sorting = $this->sortingParser->parse($request, $params);
        $params->filters = $this->filterParser->parse($request, $params);
        $params->action = $this->actionParser->parse($request, $params);

        $params->resourceConfig = $this->resourceEntityMapper
                ->getResourcesConfig()->get($params->primaryType);
                
        // Needs the params from the ActionParser.
        $params->entities = $this->entityFinder->find($params);

        // Needs the params from the ActionParser (and ParamEntityFinder).
        $params->resources = $this->bodyParser->parse($request, $params);
        

        return $params;
    }
647514
private function loadSpellingType(RequestInterface $request)
    {
        $spellingType = self::SPELLING_TYPE_FUZZY;

        try {
            $cutoffFrequencyLimit = $this->getCutoffrequencyLimit($request);
            $termVectors          = $this->getTermVectors($request);
            $queryTermStats       = $this->parseTermVectors($termVectors, $cutoffFrequencyLimit);

            if ($queryTermStats['total'] == $queryTermStats['stop']) {
                $spellingType = self::SPELLING_TYPE_PURE_STOPWORDS;
            } elseif ($queryTermStats['total'] == $queryTermStats['stop'] + $queryTermStats['exact']) {
                $spellingType = self::SPELLING_TYPE_EXACT;
            } elseif ($queryTermStats['missing'] == 0) {
                $spellingType = self::SPELLING_TYPE_MOST_EXACT;
            } elseif ($queryTermStats['total'] - $queryTermStats['missing'] > 0) {
                $spellingType = self::SPELLING_TYPE_MOST_FUZZY;
            }
        } catch (\Exception $e) {
            $spellingType = self::SPELLING_TYPE_EXACT;
        }

        return $spellingType;
    }
550614
public function match($request, $partial = null)
    {
        $path        = trim($request->getPathInfo(), self::URI_DELIMITER);
        $subPath     = $path;
        $values      = array();
        $numRoutes   = count($this->_routes);
        $matchedPath = null;

        foreach ($this->_routes as $key => $route) {
            if ($key > 0
                && $matchedPath !== null
                && $subPath !== ''
                && $subPath !== false
            ) {
                $separator = substr($subPath, 0, strlen($this->_separators[$key]));

                if ($separator !== $this->_separators[$key]) {
                    return false;
                }

                $subPath = substr($subPath, strlen($separator));
            }

            // TODO: Should be an interface method. Hack for 1.0 BC
            if (!method_exists($route, 'getVersion') || $route->getVersion() == 1) {
                $match = $subPath;
            } else {
                $request->setPathInfo($subPath);
                $match = $request;
            }

            $res = $route->match($match, true, ($key == $numRoutes - 1));
            if ($res === false) {
//BEGIN FIX
                $request->setPathInfo($path);
//END FIX
                return false;
            }

            $matchedPath = $route->getMatchedPath();

            if ($matchedPath !== null) {
                $subPath     = substr($subPath, strlen($matchedPath));
                $separator   = substr($subPath, 0, strlen($this->_separators[$key]));
            }

            $values = $res + $values;
        }

        $request->setPathInfo($path);

        if ($subPath !== '' && $subPath !== false) {
            return false;
        }

        return $values;
    }
1314712
protected function normalizeRequestUri(Request $request)
    {
        $query = $request->server->get('QUERY_STRING');

        $uri = '/'.trim(str_replace('?'.$query, '', $request->server->get('REQUEST_URI')), '/').($query ? '?'.$query : '');

        $request->server->set('REQUEST_URI', $uri);
    }
629975
public function parse(Request $request)
    {
        if ($request->has($this->name)) {
            $this->applied = true;
            $this->value   = filter_var($request->input($this->name), FILTER_VALIDATE_BOOLEAN);
        }
    }
1356300
private function getWebspaceAndLanguage(Request $request)
    {
        $webspaceKey = $this->getRequestParameter($request, 'webspace', true);
        $languageCode = $this->getRequestParameter($request, 'language', true);

        return [$webspaceKey, $languageCode];
    }
488416
public function search(Request $request)
    {
        $images = $this->imageRepository->search($request->term);

        if($request->ajax()) return response()->json([
            'images' => view('laramanager::browser.images', compact('images'))->render()
        ]);

        return view('laramanager::images.index', compact('images'));
    }
678336
protected function generateFilter($request)
    {
        $this->filters[$this->usernameField] = trim($request->input($this->usernameField));
        foreach ($this->otherFields as $of) {
            $of = trim($of);
            $this->filters[$of] = $request->input($of);
        }

        $string = '';
        $multiple = 0;
        foreach ($this->filters as $f => $v) {
            if (!empty($string)) {
                $string .= " AND ";
                $multiple = 1;
            }
            if (is_bool($v) || 'true' === strtolower($v) || 'false' === strtolower($v)) {
                if ($v === true || $v === 'true') {
                    $v = 1;
                } else {
                    $v = 0;
                }
            }
            $string .= "($f=$v)";
        }

        return ($multiple) ? "(" . $string . ")" : $string;
    }
1116128
public function getSaveValue(Request $request)
    {
        $value = parent::getSaveValue($request);

        if ($this->isJsonable()) {
            return json_encode($value);
        } elseif ($this->isDelimited()) {
            $delimiter = $this->getDelimiter();

            return implode($delimiter, $value);
        } elseif ($this->isArrayable()) {
            return (array) $value;
        }

        return $value;
    }