Request::setTrustedHeaderName()

static setTrustedHeaderName(string $key, string $value) Sets the name for trusted headers. The following header keys are supported: Request::HEADERCLIENTIP: defaults to X-Forwarded-For (see getClientIp()) Request::HEADERCLIENTHOST: defaults to X-Forwarded-Host (see getHost()) Request::HEADERCLIENTPORT: defaults to X-Forwarded-Port (see getPort()) Request::HEADERCLIENTPROTO: defaults to X-Forwarded-Proto (see getScheme() and isSecure()) Setting an empty value allows to

Request::setLocale()

setLocale(string $locale) Sets the locale. Parameters string $locale

Request::setSession()

setSession(SessionInterface $session) Sets the Session. Parameters SessionInterface $session The Session

Request::setRequestFormat()

setRequestFormat(string $format) Sets the request format. Parameters string $format The request format

Request::setMethod()

setMethod(string $method) Sets the request method. Parameters string $method

Request::setFactory()

static setFactory(callable|null $callable) Sets a callable able to create a Request instance. This is mainly useful when you need to override the Request class to keep BC with an existing system. It should not be used for any other purpose. Parameters callable|null $callable A PHP callable

Request::normalizeQueryString()

static string normalizeQueryString(string $qs) Normalizes a query string. It builds a normalized query string, where keys/value pairs are alphabetized, have consistent escaping and unneeded delimiters are removed. Parameters string $qs Query string Return Value string A normalized query string for the Request

Request::setFormat()

setFormat(string $format, string|array $mimeTypes) Associates a format with mime types. Parameters string $format The format string|array $mimeTypes The associated mime types (the preferred one must be the first as it will be used as the content type)

Request::overrideGlobals()

overrideGlobals() Overrides the PHP global variables according to this request instance. It overrides $GET, $POST, $REQUEST, $SERVER, $COOKIE. $FILES is never overridden, see rfc1867

Request::setDefaultLocale()

setDefaultLocale(string $locale) Sets the default locale. Parameters string $locale