@param Request $request

@return bool
163204
public static function useHttps(Request $request): bool
    {
        $checks = [
            'HTTPS',
            'SERVER_PORT',
            'HTTP_X_FORWARDED_SSL',
            'HTTP_X_FORWARDED_PROTO',
        ];
        foreach ($checks as $check) {
            if (call_user_func([__CLASS__, sprintf('check%s', Text::toCamelCase($check))], $request)) {
                return true;
            }
        }

        return false;
    }
252679
protected function repeaterHasSubTypes(Request $request)
    {
        if (!$resourceId = $this->getResourceId($request)) {
            return false;
        }

        if (!$model = $this->model()->whereId($resourceId)->first()) {
            return false;
        }

        return method_exists($model->type, 'types');
    }
128392
public function supports(Request $request)
    {
        $routeParameters = $request->get('_route_params');

        if (!is_array($routeParameters)) {
            return false;
        }

        if (!key_exists(LAGAdminBundle::REQUEST_PARAMETER_ADMIN, $routeParameters) ||
            !key_exists(LAGAdminBundle::REQUEST_PARAMETER_ACTION, $routeParameters)
        ) {
            return false;
        }

        if (!$this->resourceCollection->has($routeParameters[LAGAdminBundle::REQUEST_PARAMETER_ADMIN])) {
            return false;
        }

        return true;
    }
242476
protected function isDonateAlreadyAdded(Request $request)
    {
        /** @var \PServerCore\Entity\Repository\DonateLog $donateEntity */
        $donateEntity = $this->entityManager->getRepository($this->collectionOptions->getEntityOptions()->getDonateLog());

        return $donateEntity->isDonateAlreadyAdded($request->getTransactionId(),
            $this->mapPaymentProvider2DonateType($request));
    }
771059
public function canSkip(Request $request)
    {
        $routeName = $request->route()->getName();

        return in_array($routeName, $this->preventRouteNames, true);
    }
577520
public function matchRequest(Request $request) {
        $context = new RequestContext();
        $context->fromRequest($request);
        $this->setContext($context);

        return($this->match($request->getPathInfo()));
    }
264037
public function handle(Request $request)
    {
        $pathInfo = $request->getPathInfo();

        if (0 === strpos($pathInfo, $this->basePath)) {
            foreach ($this->routes as $config) {
                list($method, $pattern, $controller) = $config;

                if ($request->getMethod() === strtoupper($method)
                    && preg_match('!^' . preg_quote($this->basePath . $pattern, '!') . '$!', $request->getPathInfo())
                ) {
                    return call_user_func($controller, $request);
                }
            }
        }

        return null;
    }
1102015
private function tokenShouldNotBeChecked(Request $request) : bool
    {
        return in_array($request->getMethod(), [RequestMethods::GET, RequestMethods::HEAD, RequestMethods::OPTIONS]);
    }
461891
public function postRequest( Request $request ) {
		$response = $this->getClient()->request(
			'POST',
			$this->apiUrl,
			$this->getClientRequestOptions( $request, $this->getPostRequestEncoding( $request ) )
		);

		return $this->decodeResponse( $response );
	}
1271799
public function supports(Request $request)
    {
        $post = json_decode($request->getContent(), true);

        return !empty($post[self::EMAIL_FIELD]) && !empty($post[self::PASSWORD_FIELD]);
    }
1268147
private function isFromTrustedProxy(Request $request)
    {
        return $request->getTrustedProxies() && IpUtils::checkIp($request->server->get('REMOTE_ADDR'), $request->getTrustedProxies());
    }
600552
static public function isLogedIn ($request)
    {
        if (! isset($request->user) or $request->user->isAnonymous()) {
            return false;
        }
        if (! $request->user->isActive()) {
            return false;
        }
        return true;
    }
848152
public function meetsConstraints(Request $request)
    {
        foreach ($this->constraints as $constraint) {
            if (!$constraint($request)) {
                return false;
            }
        }

        return true;
    }
352123
public function handle(Request $request)
	{
		$response = $this->next($request);

		if ($content = $response->original)
		{
			$content = $this->traverse($request, $content);

			$response->setContent($content);
		}

		return $response;
	}
241931
public function isSubmitted(Request $request)
    {
        $arguments = $this->method === "GET" ? $request->get : $request->post;

        // Check if the form has been submitted at all
        return $this->method === $request->method && $arguments['_form_name'] === $this->name;
    }
71422
public function detect(Request $request)
	{
		if ($request->isMethod('post')) {
			return $request->request->get($this->parameterName);
		}

		return $request->query->get($this->parameterName);
	}
1279098
public function sendRequest(Request $request)
    {
        $response = $this->httpClient->send($request);

        $this->checkErrorResponse($response);

        return $response;
    }