Request::getScriptName()

string getScriptName() Returns current script name. Return Value string

Request::getSchemeAndHttpHost()

string getSchemeAndHttpHost() Gets the scheme and HTTP host. If the URL was called with basic authentication, the user and the password are not added to the generated string. Return Value string The scheme and HTTP host

Request::getScheme()

string getScheme() Gets the request's scheme. Return Value string

Request::getRequestUri()

string getRequestUri() Returns the requested URI (path and query string). Return Value string The raw URI (i.e. not URI decoded)

Request::getRequestFormat()

string getRequestFormat(string $default = 'html') Gets the request format. Here is the process to determine the format: format defined by the user (with setRequestFormat()) _format request attribute $default Parameters string $default The default format Return Value string The request format

Request::getRelativeUriForPath()

string getRelativeUriForPath(string $path) Returns the path as relative reference from the current Request path. Only the URIs path component (no schema, host etc.) is relevant and must be given. Both paths must be absolute and not contain relative parts. Relative URLs from one resource to another are useful when generating self-contained downloadable document archives. Furthermore, they can be used to reduce the link size in documents. Example target paths, given a base path of

Request::getRealMethod()

string getRealMethod() Gets the "real" request method. Return Value string The request method See also getMethod()

Request::getQueryString()

string|null getQueryString() Generates the normalized query string for the Request. It builds a normalized query string, where keys/value pairs are alphabetized and have consistent escaping. Return Value string|null A normalized query string for the Request

Request::getPreferredLanguage()

string|null getPreferredLanguage(array $locales = null) Returns the preferred language. Parameters array $locales An array of ordered available locales Return Value string|null The preferred locale

Request::getPort()

string getPort() Returns the port on which the request is made. This method can read the client port from the "X-Forwarded-Port" header when trusted proxies were set via "setTrustedProxies()". The "X-Forwarded-Port" header must contain the client port. If your reverse proxy uses a different header name than "X-Forwarded-Port", configure it via "setTrustedHeaderName()" with the "client-port" key. Return Value string