Applies the defined strategy on the provided request.
Value may contain a coma separated string values, we use first as identifier.

@param Request $request request to handle

@return string
546107
public function apply(Request $request)
    {
        $bagValue = $this->extractFieldInfo($request->cookies, $this->field);

        // this needs to be available in a later state of the application
        $this->extractAdUsername($request, $bagValue);

        return $this->extractCoreId($request, $bagValue);
    }
131294
public function searchAction(Request $request)
    {
        $searchAction = $this->container->get(SearchAction::class);

        return $searchAction($request);
    }
1060562
protected function getErrorForRequest(Request $request)
    {
        $authenticationErrorKey = Security::AUTHENTICATION_ERROR;

        if ($request->attributes->has($authenticationErrorKey)) {
            return $request->attributes->get($authenticationErrorKey);
        }

        $session = $request->getSession();
        if (null !== $session && $session->has($authenticationErrorKey)) {
            $error = $session->get($authenticationErrorKey);
            $session->remove($authenticationErrorKey);

            return $error;
        }

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

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

    }
535380
private function getDefaultAction(Request $request)
    {
        if (!preg_match('/(\w+)Action$/', $request->attributes->get('_controller'), $match)) {
            throw new \RuntimeException('Unable to determine controller name');
        }

        return strtolower(preg_replace('/(?<!^)[A-Z]/', '_$0', $match[1]));
    }
989759
public function cgetAction(Request $request)
    {
        $locale = $this->getLocale($request);

        // if the type parameter is falsy, assign NULL to $type
        $type = $request->query->get('type', null) ?: null;

        $idsString = $request->get('ids');

        if ($idsString) {
            $ids = explode(',', $idsString);
            $snippets = $this->snippetRepository->getSnippetsByUuids($ids, $locale);
            $total = count($snippets);
        } else {
            $snippets = $this->snippetRepository->getSnippets(
                $locale,
                $type,
                $this->listRestHelper->getOffset(),
                $this->listRestHelper->getLimit(),
                $this->listRestHelper->getSearchPattern(),
                $this->listRestHelper->getSortColumn(),
                $this->listRestHelper->getSortOrder()
            );

            $total = $this->snippetRepository->getSnippetsAmount(
                $locale,
                $type,
                $this->listRestHelper->getSearchPattern(),
                $this->listRestHelper->getSortColumn(),
                $this->listRestHelper->getSortOrder()
            );
        }

        $data = new ListRepresentation(
            $snippets,
            'snippets',
            'get_snippets',
            $request->query->all(),
            $this->listRestHelper->getPage(),
            $this->listRestHelper->getLimit(),
            $total
        );

        return $this->viewHandler->handle(View::create($data));
    }
267631
protected function getSortingFromRequest(Request $request)
    {
        return $this->extractValues($this->getValuesFromRequest($request), $this->getSortingPrefix());
    }
787732
protected function getFormat(Request $request)
    {
        $format = $request->getQueryParam('format');
        if (!isset($format)) {
            $format = $this->defaultFormat;
        }

        return $format;
    }
774359
protected function resolveRequestSignature($request)
    {
        return sha1(
            $request->method() .
            '|' . $request->server('SERVER_NAME') .
            '|' . $request->path() .
            '|' . $request->ip()
        );
    }
1316263
protected function applyConfig($request)
    {
        $requestDelay = $this->getConfig('request_delay');
        if ($requestDelay > 0) {
            $request->setDelay($requestDelay);
        }

        return $request;
    }
819115
public static function getQueryString(Request $request): ?string
    {
        $qs = $request->server->get('QUERY_STRING', '');
        if ('' === $qs) {
            return null;
        }

        $parts = [];

        foreach (explode('&', $qs) as $param) {
            if ('' === $param || '=' === $param[0]) {
                // Ignore useless delimiters, e.g. "x=y&".
                // Also ignore pairs with empty key, even if there was a value, e.g. "=value", as such nameless values cannot be retrieved anyway.
                // PHP also does not include them when building _GET.
                continue;
            }

            $keyValuePair = explode('=', $param, 2);

            // GET parameters, that are submitted from a HTML form, encode spaces as "+" by default (as defined in enctype application/x-www-form-urlencoded).
            // PHP also converts "+" to spaces when filling the global _GET or when using the function parse_str. This is why we use urldecode and then normalize to
            // RFC 3986 with rawurlencode.
            $parts[] = isset($keyValuePair[1]) ?
                rawurlencode(urldecode($keyValuePair[0])).'='.rawurlencode(urldecode($keyValuePair[1])) :
                rawurlencode(urldecode($keyValuePair[0]));
        }

        return implode('&', $parts);
    }
1243713
public function determineLocale(Request $request)
    {
        $locale = $this->determiners
            ->map(function ($determiner) use ($request) {
                return $determiner->determineLocale($request);
            })
            ->filter()
            ->first();

        return $locale ?: $this->fallback;
    }
1338987
public function matchRequest(Request $request)
    {
        $this->reset();

        $groups = Arr::get($this->config, 'group', []);
        $matchs = Arr::get($this->config, 'match', []);

        // 全局中间件
        if (isset($matchs['*'])) {
            $wildcards = is_string($matchs['*']) ? (array) $matchs['*'] : $matchs['*'];

            foreach ($wildcards as $alias) {
                if (isset($groups[$alias])) {
                    foreach ($groups[$alias] as $name) {
                        $this->addMatched($name);
                    }
                } else {
                    $this->addMatched($alias);
                }
            }

            unset($wildcards, $matchs['*']);
        }

        // 匹配中间件
        if (count($matchs) > 0) {
            // {{
            $uri = $request->getUri()->getPath();
            // }}
            foreach ($matchs as $pattern => $name) {
                if (preg_match("#{$pattern}#i", $uri)) {
                    $this->addMatched($name);
                }
            }

            unset($uri);
        }

        unset($groups, $matchs);
    }
583957
protected function determineTargetUrl(Request $request)
    {
        if ($this->options['always_use_default_target_path']) {
            return $this->options['default_target_path'];
        }

        if ($targetUrl = $request->get($this->options['target_path_parameter'], null, true)) {
            return $targetUrl;
        }

        if (null !== $this->providerKey && $targetUrl = $request->getSession()->get('_security.'.$this->providerKey.'.target_path')) {
            $request->getSession()->remove('_security.'.$this->providerKey.'.target_path');

            return $targetUrl;
        }

        if ($this->options['use_referer'] && ($targetUrl = $request->headers->get('Referer')) && $targetUrl !== $this->httpUtils->generateUri($request, $this->options['login_path'])) {
            return $targetUrl;
        }
        return $this->options['default_target_path'];
    }
1272756
public function selectLinkAction(Request $request)
    {
        $params = $this->getTemplateParameters($request);
        $params['cke'] = false;
        $params['multilanguage'] = $this->getParameter('kunstmaan_admin.multi_language');

        return $params;
    }
157154
public function match( Request $request )
	{
		$routes = $this->get( $request->getMethod() );

		// First, we will see if we can find a matching route for this current request
		// method. If we can, great, we can just return it so that it can be called
		// by the consumer. Otherwise we will check for routes with another verb.
		$route = $this->check( $routes, $request );

		if ( !is_null( $route ) )
		{
			return $route->bind( $request );
		}

		// If no route was found we will now check if a matching route is specified by
		// another HTTP verb. If it is we will need to throw a MethodNotAllowed and
		// inform the user agent of which HTTP verb it should use for this route.
		$others = $this->checkForAlternateVerbs( $request );

		if ( count( $others ) > 0 )
		{
			return $this->getRouteForMethods( $request, $others );
		}

		throw new NotFoundHttpException;
	}
178305
protected function doRequest($request)
    {
        if (!$this->firstRequest) {
            $this->initialize($request);
        }
        $this->firstRequest = false;

        $this->applyBindings();
        $this->applyContextualBindings();
        $this->applyInstances();
        $this->applyApplicationHandlers();

        $request = Request::createFromBase($request);
        $response = $this->kernel->handle($request);
        $this->app->make('Illuminate\Contracts\Http\Kernel')->terminate($request, $response);

        return $response;
    }