Open Journal Systems  3.3.0
Symfony\Component\HttpFoundation\Request Class Reference
Inheritance diagram for Symfony\Component\HttpFoundation\Request:
Symfony\Component\HttpFoundation\ApacheRequest Symfony\Component\HttpFoundation\Tests\NewRequest Symfony\Component\HttpFoundation\Tests\RequestContentProxy

Public Member Functions

 __clone ()
 
 __clone ()
 
 __construct (array $query=[], array $request=[], array $attributes=[], array $cookies=[], array $files=[], array $server=[], $content=null)
 
 __construct (array $query=array(), array $request=array(), array $attributes=array(), array $cookies=array(), array $files=array(), array $server=array(), $content=null)
 
 __toString ()
 
 __toString ()
 
 duplicate (array $query=null, array $request=null, array $attributes=null, array $cookies=null, array $files=null, array $server=null)
 
 duplicate (array $query=null, array $request=null, array $attributes=null, array $cookies=null, array $files=null, array $server=null)
 
 get ($key, $default=null)
 
 get ($key, $default=null)
 
 getAcceptableContentTypes ()
 
 getAcceptableContentTypes ()
 
 getBasePath ()
 
 getBasePath ()
 
 getBaseUrl ()
 
 getBaseUrl ()
 
 getCharsets ()
 
 getCharsets ()
 
 getClientIp ()
 
 getClientIp ()
 
 getClientIps ()
 
 getClientIps ()
 
 getContent ($asResource=false)
 
 getContent ($asResource=false)
 
 getContentType ()
 
 getContentType ()
 
 getDefaultLocale ()
 
 getDefaultLocale ()
 
 getEncodings ()
 
 getEncodings ()
 
 getETags ()
 
 getETags ()
 
 getFormat ($mimeType)
 
 getFormat ($mimeType)
 
 getHost ()
 
 getHost ()
 
 getHttpHost ()
 
 getHttpHost ()
 
 getLanguages ()
 
 getLanguages ()
 
 getLocale ()
 
 getLocale ()
 
 getMethod ()
 
 getMethod ()
 
 getMimeType ($format)
 
 getMimeType ($format)
 
 getPassword ()
 
 getPassword ()
 
 getPathInfo ()
 
 getPathInfo ()
 
 getPort ()
 
 getPort ()
 
 getPreferredFormat (?string $default='html')
 
 getPreferredLanguage (array $locales=null)
 
 getPreferredLanguage (array $locales=null)
 
 getProtocolVersion ()
 
 getQueryString ()
 
 getQueryString ()
 
 getRealMethod ()
 
 getRealMethod ()
 
 getRelativeUriForPath ($path)
 
 getRelativeUriForPath ($path)
 
 getRequestFormat ($default='html')
 
 getRequestFormat ($default='html')
 
 getRequestUri ()
 
 getRequestUri ()
 
 getScheme ()
 
 getScheme ()
 
 getSchemeAndHttpHost ()
 
 getSchemeAndHttpHost ()
 
 getScriptName ()
 
 getScriptName ()
 
 getSession ()
 
 getSession ()
 
 getUri ()
 
 getUri ()
 
 getUriForPath ($path)
 
 getUriForPath ($path)
 
 getUser ()
 
 getUser ()
 
 getUserInfo ()
 
 getUserInfo ()
 
 hasPreviousSession ()
 
 hasPreviousSession ()
 
 hasSession ()
 
 hasSession ()
 
 initialize (array $query=[], array $request=[], array $attributes=[], array $cookies=[], array $files=[], array $server=[], $content=null)
 
 initialize (array $query=array(), array $request=array(), array $attributes=array(), array $cookies=array(), array $files=array(), array $server=array(), $content=null)
 
 isFromTrustedProxy ()
 
 isFromTrustedProxy ()
 
 isMethod ($method)
 
 isMethod ($method)
 
 isMethodCacheable ()
 
 isMethodCacheable ()
 
 isMethodIdempotent ()
 
 isMethodIdempotent ()
 
 isMethodSafe ()
 
 isMethodSafe ()
 
 isNoCache ()
 
 isNoCache ()
 
 isSecure ()
 
 isSecure ()
 
 isXmlHttpRequest ()
 
 isXmlHttpRequest ()
 
 overrideGlobals ()
 
 overrideGlobals ()
 
 setDefaultLocale ($locale)
 
 setDefaultLocale ($locale)
 
 setFormat ($format, $mimeTypes)
 
 setFormat ($format, $mimeTypes)
 
 setLocale ($locale)
 
 setLocale ($locale)
 
 setMethod ($method)
 
 setMethod ($method)
 
 setRequestFormat ($format)
 
 setRequestFormat ($format)
 
 setSession (SessionInterface $session)
 
 setSession (SessionInterface $session)
 
 setSessionFactory (callable $factory)
 

Static Public Member Functions

static create ($uri, $method='GET', $parameters=[], $cookies=[], $files=[], $server=[], $content=null)
 
static create ($uri, $method='GET', $parameters=array(), $cookies=array(), $files=array(), $server=array(), $content=null)
 
static createFromGlobals ()
 
static createFromGlobals ()
 
static enableHttpMethodParameterOverride ()
 
static enableHttpMethodParameterOverride ()
 
static getHttpMethodParameterOverride ()
 
static getHttpMethodParameterOverride ()
 
static getMimeTypes ($format)
 
static getMimeTypes ($format)
 
static getTrustedHeaderName ($key)
 
static getTrustedHeaderSet ()
 
static getTrustedHeaderSet ()
 
static getTrustedHosts ()
 
static getTrustedHosts ()
 
static getTrustedProxies ()
 
static getTrustedProxies ()
 
static normalizeQueryString ($qs)
 
static normalizeQueryString ($qs)
 
static setFactory ($callable)
 
static setFactory ($callable)
 
static setTrustedHeaderName ($key, $value)
 
static setTrustedHosts (array $hostPatterns)
 
static setTrustedHosts (array $hostPatterns)
 
static setTrustedProxies (array $proxies)
 
static setTrustedProxies (array $proxies, int $trustedHeaderSet)
 

Data Fields

 $attributes
 
 $cookies
 
 $files
 
 $headers
 
 $query
 
 $request
 
 $server
 
const HEADER_CLIENT_HOST = self::HEADER_X_FORWARDED_HOST
 
const HEADER_CLIENT_IP = self::HEADER_X_FORWARDED_FOR
 
const HEADER_CLIENT_PORT = self::HEADER_X_FORWARDED_PORT
 
const HEADER_CLIENT_PROTO = self::HEADER_X_FORWARDED_PROTO
 
const HEADER_FORWARDED = 0b00001
 
const HEADER_X_FORWARDED_ALL = 0b11110
 
const HEADER_X_FORWARDED_AWS_ELB = 0b11010
 
const HEADER_X_FORWARDED_FOR = 0b00010
 
const HEADER_X_FORWARDED_HOST = 0b00100
 
const HEADER_X_FORWARDED_PORT = 0b10000
 
const HEADER_X_FORWARDED_PROTO = 0b01000
 
const METHOD_CONNECT = 'CONNECT'
 
const METHOD_DELETE = 'DELETE'
 
const METHOD_GET = 'GET'
 
const METHOD_HEAD = 'HEAD'
 
const METHOD_OPTIONS = 'OPTIONS'
 
const METHOD_PATCH = 'PATCH'
 
const METHOD_POST = 'POST'
 
const METHOD_PURGE = 'PURGE'
 
const METHOD_PUT = 'PUT'
 
const METHOD_TRACE = 'TRACE'
 

Protected Member Functions

 prepareBasePath ()
 
 prepareBasePath ()
 
 prepareBaseUrl ()
 
 prepareBaseUrl ()
 
 preparePathInfo ()
 
 preparePathInfo ()
 
 prepareRequestUri ()
 
 prepareRequestUri ()
 

Static Protected Member Functions

static initializeFormats ()
 
static initializeFormats ()
 

Protected Attributes

 $acceptableContentTypes
 
 $basePath
 
 $baseUrl
 
 $charsets
 
 $content
 
 $defaultLocale = 'en'
 
 $encodings
 
 $format
 
 $languages
 
 $locale
 
 $method
 
 $pathInfo
 
 $requestUri
 
 $session
 

Static Protected Attributes

static $formats
 
static $httpMethodParameterOverride = false
 
static $requestFactory
 
static $trustedHeaders
 
static $trustedHostPatterns = array()
 
static $trustedHosts = array()
 
static $trustedProxies = array()
 

Detailed Description

Request represents an HTTP request.

The methods dealing with URL accept / return a raw path (% encoded):

  • getBasePath
  • getBaseUrl
  • getPathInfo
  • getRequestUri
  • getUri
  • getUriForPath
Author
Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com

Definition at line 31 of file lib/vendor/symfony/http-foundation/Request.php.

Constructor & Destructor Documentation

◆ __construct() [1/2]

Symfony\Component\HttpFoundation\Request::__construct ( array  $query = array(),
array  $request = array(),
array  $attributes = array(),
array  $cookies = array(),
array  $files = array(),
array  $server = array(),
  $content = null 
)

Constructor.

Parameters
array$queryThe GET parameters
array$requestThe POST parameters
array$attributesThe request attributes (parameters parsed from the PATH_INFO, ...)
array$cookiesThe COOKIE parameters
array$filesThe FILES parameters
array$serverThe SERVER parameters
string | resource$contentThe raw body data

Definition at line 319 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$attributes, Symfony\Component\HttpFoundation\Request\$content, Symfony\Component\HttpFoundation\Request\$cookies, Symfony\Component\HttpFoundation\Request\$files, Symfony\Component\HttpFoundation\Request\$query, Symfony\Component\HttpFoundation\Request\$request, Symfony\Component\HttpFoundation\Request\$server, and Symfony\Component\HttpFoundation\Request\initialize().

◆ __construct() [2/2]

Symfony\Component\HttpFoundation\Request::__construct ( array  $query = [],
array  $request = [],
array  $attributes = [],
array  $cookies = [],
array  $files = [],
array  $server = [],
  $content = null 
)
Parameters
array$queryThe GET parameters
array$requestThe POST parameters
array$attributesThe request attributes (parameters parsed from the PATH_INFO, ...)
array$cookiesThe COOKIE parameters
array$filesThe FILES parameters
array$serverThe SERVER parameters
string | resource | null$contentThe raw body data

Definition at line 311 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$attributes, Symfony\Component\HttpFoundation\Request\$content, Symfony\Component\HttpFoundation\Request\$cookies, Symfony\Component\HttpFoundation\Request\$files, Symfony\Component\HttpFoundation\Request\$query, Symfony\Component\HttpFoundation\Request\$request, Symfony\Component\HttpFoundation\Request\$server, and Symfony\Component\HttpFoundation\Request\initialize().

Member Function Documentation

◆ __clone() [1/2]

◆ __clone() [2/2]

◆ __toString() [1/2]

◆ __toString() [2/2]

◆ create() [1/2]

static Symfony\Component\HttpFoundation\Request::create (   $uri,
  $method = 'GET',
  $parameters = [],
  $cookies = [],
  $files = [],
  $server = [],
  $content = null 
)
static

Creates a Request based on a given URI and configuration.

The information contained in the URI always take precedence over the other information (server and parameters).

Parameters
string$uriThe URI
string$methodThe HTTP method
array$parametersThe query (GET) or request (POST) parameters
array$cookiesThe request cookies ($_COOKIE)
array$filesThe request files ($_FILES)
array$serverThe server parameters ($_SERVER)
string | resource | null$contentThe raw body data
Returns
static

Definition at line 387 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$content, Symfony\Component\HttpFoundation\Request\$cookies, Symfony\Component\HttpFoundation\Request\$files, Symfony\Component\HttpFoundation\Request\$method, Symfony\Component\HttpFoundation\Request\$query, Symfony\Component\HttpFoundation\Request\$request, and Symfony\Component\HttpFoundation\Request\$server.

◆ create() [2/2]

static Symfony\Component\HttpFoundation\Request::create (   $uri,
  $method = 'GET',
  $parameters = array(),
  $cookies = array(),
  $files = array(),
  $server = array(),
  $content = null 
)
static

Creates a Request based on a given URI and configuration.

The information contained in the URI always take precedence over the other information (server and parameters).

Parameters
string$uriThe URI
string$methodThe HTTP method
array$parametersThe query (GET) or request (POST) parameters
array$cookiesThe request cookies ($_COOKIE)
array$filesThe request files ($_FILES)
array$serverThe server parameters ($_SERVER)
string$contentThe raw body data
Returns
static

Definition at line 408 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$content, Symfony\Component\HttpFoundation\Request\$cookies, Symfony\Component\HttpFoundation\Request\$files, Symfony\Component\HttpFoundation\Request\$method, Symfony\Component\HttpFoundation\Request\$query, Symfony\Component\HttpFoundation\Request\$request, and Symfony\Component\HttpFoundation\Request\$server.

Referenced by Symfony\Component\HttpFoundation\Tests\BinaryFileResponseTest\testAcceptRangeNotOverriden(), Symfony\Component\HttpFoundation\Tests\BinaryFileResponseTest\testAcceptRangeOnUnsafeMethods(), Symfony\Component\HttpFoundation\Tests\RequestMatcherTest\testAttributes(), Symfony\Component\HttpFoundation\Tests\RequestTest\testCreate(), Symfony\Component\HttpFoundation\Tests\RequestTest\testCreateCheckPrecedence(), Symfony\Component\HttpFoundation\Tests\BinaryFileResponseTest\testDeleteFileAfterSend(), Symfony\Component\HttpFoundation\Tests\RequestTest\testFactory(), Symfony\Component\HttpFoundation\Tests\BinaryFileResponseTest\testFullFileRequests(), Symfony\Component\HttpFoundation\Tests\RequestTest\testGetBaseUrl(), Symfony\Component\HttpFoundation\Tests\RequestStackTest\testGetCurrentRequest(), Symfony\Component\HttpFoundation\Tests\RequestStackTest\testGetMasterRequest(), Symfony\Component\HttpFoundation\Tests\RequestStackTest\testGetParentRequest(), Symfony\Component\HttpFoundation\Tests\RequestTest\testGetPassword(), Symfony\Component\HttpFoundation\Tests\RequestTest\testGetPort(), Symfony\Component\HttpFoundation\Tests\RequestTest\testGetRelativeUriForPath(), Symfony\Component\HttpFoundation\Tests\RequestTest\testGetTrustedProxiesInvalidHeaderName(), Symfony\Component\HttpFoundation\Tests\RequestTest\testGetUriForPath(), Symfony\Component\HttpFoundation\Tests\RequestTest\testGetUser(), Symfony\Component\HttpFoundation\Tests\RequestMatcherTest\testHost(), Symfony\Component\HttpFoundation\Tests\RequestTest\testHostValidity(), Symfony\Component\HttpFoundation\Tests\RequestTest\testIISRequestUri(), Symfony\Component\HttpFoundation\Tests\BinaryFileResponseTest\testInvalidRequests(), Symfony\Component\HttpFoundation\Tests\ResponseTest\testIsNotModifiedNotSafe(), Symfony\Component\HttpFoundation\Tests\RequestTest\testLegacyTrustedProxies(), Symfony\Component\HttpFoundation\Tests\ExpressionRequestMatcherTest\testMatchesWhenParentMatchesIsFalse(), Symfony\Component\HttpFoundation\Tests\ExpressionRequestMatcherTest\testMatchesWhenParentMatchesIsTrue(), Symfony\Component\HttpFoundation\Tests\RequestMatcherTest\testMethod(), Symfony\Component\HttpFoundation\Tests\RequestMatcherTest\testPath(), Symfony\Component\HttpFoundation\Tests\RequestMatcherTest\testPathWithEncodedCharacters(), Symfony\Component\HttpFoundation\Tests\RequestMatcherTest\testPathWithLocaleIsNotSupported(), Symfony\Component\HttpFoundation\Tests\ResponseTest\testPrepareRemovesContentForHeadRequests(), Symfony\Component\HttpFoundation\Tests\ResponseTest\testPrepareRemovesContentForInformationalResponse(), Symfony\Component\HttpFoundation\Tests\ResponseTest\testPrepareRemovesContentLength(), Symfony\Component\HttpFoundation\Tests\ResponseTest\testPrepareSetContentType(), Symfony\Component\HttpFoundation\Tests\ResponseTest\testPrepareSetsPragmaOnHttp10Only(), Symfony\Component\HttpFoundation\Tests\StreamedResponseTest\testPrepareWith10Protocol(), Symfony\Component\HttpFoundation\Tests\StreamedResponseTest\testPrepareWith11Protocol(), Symfony\Component\HttpFoundation\Tests\StreamedResponseTest\testPrepareWithCacheHeaders(), Symfony\Component\HttpFoundation\Tests\StreamedResponseTest\testPrepareWithHeadRequest(), Symfony\Component\HttpFoundation\Tests\BinaryFileResponseTest\testRangeRequestsWithoutLastModifiedDate(), Symfony\Component\HttpFoundation\Tests\BinaryFileResponseTest\testRequests(), Symfony\Component\HttpFoundation\Tests\BinaryFileResponseTest\testRequestsWithoutEtag(), Symfony\Component\HttpFoundation\Tests\RequestMatcherTest\testScheme(), Symfony\Component\HttpFoundation\Tests\RequestTest\testSetTrustedProxiesInvalidHeaderName(), Symfony\Component\HttpFoundation\Tests\BinaryFileResponseTest\testStream(), Symfony\Component\HttpFoundation\Tests\RequestTest\testTrustedHosts(), Symfony\Component\HttpFoundation\Tests\RequestTest\testTrustedProxiesForwarded(), Symfony\Component\HttpFoundation\Tests\RequestTest\testTrustedProxiesXForwardedFor(), Symfony\Component\HttpFoundation\Tests\RequestTest\testVeryLongHosts(), Symfony\Component\HttpFoundation\Tests\BinaryFileResponseTest\testXAccelMapping(), and Symfony\Component\HttpFoundation\Tests\BinaryFileResponseTest\testXSendfile().

◆ createFromGlobals() [1/2]

static Symfony\Component\HttpFoundation\Request::createFromGlobals ( )
static

Creates a new request with values from PHP's super globals.

Returns
static

Definition at line 357 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$request.

◆ createFromGlobals() [2/2]

static Symfony\Component\HttpFoundation\Request::createFromGlobals ( )
static

◆ duplicate() [1/2]

Symfony\Component\HttpFoundation\Request::duplicate ( array  $query = null,
array  $request = null,
array  $attributes = null,
array  $cookies = null,
array  $files = null,
array  $server = null 
)

Clones a request and overrides some of its parameters.

Parameters
array$queryThe GET parameters
array$requestThe POST parameters
array$attributesThe request attributes (parameters parsed from the PATH_INFO, ...)
array$cookiesThe COOKIE parameters
array$filesThe FILES parameters
array$serverThe SERVER parameters
Returns
static

Definition at line 505 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$attributes, Symfony\Component\HttpFoundation\Request\$cookies, Symfony\Component\HttpFoundation\Request\$files, Symfony\Component\HttpFoundation\Request\$query, Symfony\Component\HttpFoundation\Request\$request, Symfony\Component\HttpFoundation\Request\$server, and Symfony\Component\HttpFoundation\Request\getRequestFormat().

◆ duplicate() [2/2]

Symfony\Component\HttpFoundation\Request::duplicate ( array  $query = null,
array  $request = null,
array  $attributes = null,
array  $cookies = null,
array  $files = null,
array  $server = null 
)

Clones a request and overrides some of its parameters.

Parameters
array$queryThe GET parameters
array$requestThe POST parameters
array$attributesThe request attributes (parameters parsed from the PATH_INFO, ...)
array$cookiesThe COOKIE parameters
array$filesThe FILES parameters
array$serverThe SERVER parameters
Returns
static

Definition at line 526 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$attributes, Symfony\Component\HttpFoundation\Request\$cookies, Symfony\Component\HttpFoundation\Request\$files, Symfony\Component\HttpFoundation\Request\$query, Symfony\Component\HttpFoundation\Request\$request, Symfony\Component\HttpFoundation\Request\$server, and Symfony\Component\HttpFoundation\Request\getRequestFormat().

◆ enableHttpMethodParameterOverride() [1/2]

static Symfony\Component\HttpFoundation\Request::enableHttpMethodParameterOverride ( )
static

Enables support for the _method request parameter to determine the intended HTTP method.

Be warned that enabling this feature might lead to CSRF issues in your code. Check that you are using CSRF tokens when required. If the HTTP method parameter override is enabled, an html-form with method "POST" can be altered and used to send a "PUT" or "DELETE" request via the _method request parameter. If these methods are not protected against CSRF, this presents a possible vulnerability.

The HTTP method can only be overridden when the real HTTP method is POST.

Definition at line 742 of file vendor/symfony/http-foundation/Request.php.

◆ enableHttpMethodParameterOverride() [2/2]

static Symfony\Component\HttpFoundation\Request::enableHttpMethodParameterOverride ( )
static

Enables support for the _method request parameter to determine the intended HTTP method.

Be warned that enabling this feature might lead to CSRF issues in your code. Check that you are using CSRF tokens when required. If the HTTP method parameter override is enabled, an html-form with method "POST" can be altered and used to send a "PUT" or "DELETE" request via the _method request parameter. If these methods are not protected against CSRF, this presents a possible vulnerability.

The HTTP method can only be overridden when the real HTTP method is POST.

Definition at line 840 of file lib/vendor/symfony/http-foundation/Request.php.

Referenced by Symfony\Component\HttpFoundation\Tests\RequestTest\testCreateFromGlobals(), and Symfony\Component\HttpFoundation\Tests\RequestTest\testGetSetMethod().

◆ get() [1/2]

Symfony\Component\HttpFoundation\Request::get (   $key,
  $default = null 
)

Gets a "parameter" value from any bag.

This method is mainly useful for libraries that want to provide some flexibility. If you don't need the flexibility in controllers, it is better to explicitly get request parameters from the appropriate public property instead (attributes, query, request).

Order of precedence: PATH (routing placeholders or custom attributes), GET, BODY

Parameters
string$keyThe key
mixed$defaultThe default value if the parameter key does not exist
Returns
mixed

Definition at line 771 of file vendor/symfony/http-foundation/Request.php.

◆ get() [2/2]

Symfony\Component\HttpFoundation\Request::get (   $key,
  $default = null 
)

Gets a "parameter" value from any bag.

This method is mainly useful for libraries that want to provide some flexibility. If you don't need the flexibility in controllers, it is better to explicitly get request parameters from the appropriate public property instead (attributes, query, request).

Order of precedence: PATH (routing placeholders or custom attributes), GET, BODY

Parameters
string$keythe key
mixed$defaultthe default value if the parameter key does not exist
Returns
mixed

Definition at line 869 of file lib/vendor/symfony/http-foundation/Request.php.

Referenced by Symfony\Component\HttpFoundation\Response\ensureIEOverSSLCompatibility(), Symfony\Component\HttpFoundation\Response\isNotModified(), Symfony\Component\HttpFoundation\RequestMatcher\matches(), Symfony\Component\HttpFoundation\BinaryFileResponse\prepare(), and Symfony\Component\HttpFoundation\Response\prepare().

◆ getAcceptableContentTypes() [1/2]

Symfony\Component\HttpFoundation\Request::getAcceptableContentTypes ( )

Gets a list of content types acceptable by the client browser.

Returns
array List of content types in preferable order

Definition at line 1786 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$acceptableContentTypes, and Symfony\Component\HttpFoundation\AcceptHeader\fromString().

◆ getAcceptableContentTypes() [2/2]

Symfony\Component\HttpFoundation\Request::getAcceptableContentTypes ( )

Gets a list of content types acceptable by the client browser.

Returns
array List of content types in preferable order

Definition at line 1823 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$acceptableContentTypes, and Symfony\Component\HttpFoundation\AcceptHeader\fromString().

Referenced by Symfony\Component\HttpFoundation\Request\getPreferredFormat().

◆ getBasePath() [1/2]

Symfony\Component\HttpFoundation\Request::getBasePath ( )

Returns the root path from which this request is executed.

Suppose that an index.php file instantiates this request object:

Returns
string The raw path (i.e. not urldecoded)

Definition at line 941 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$basePath, and Symfony\Component\HttpFoundation\Request\prepareBasePath().

◆ getBasePath() [2/2]

Symfony\Component\HttpFoundation\Request::getBasePath ( )

Returns the root path from which this request is executed.

Suppose that an index.php file instantiates this request object:

Returns
string The raw path (i.e. not urldecoded)

Definition at line 1026 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$basePath, and Symfony\Component\HttpFoundation\Request\prepareBasePath().

◆ getBaseUrl() [1/2]

Symfony\Component\HttpFoundation\Request::getBaseUrl ( )

Returns the root URL from which this request is executed.

The base URL never ends with a /.

This is similar to getBasePath(), except that it also includes the script filename (e.g. index.php) if one exists.

Returns
string The raw URL (i.e. not urldecoded)

Definition at line 960 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$baseUrl, and Symfony\Component\HttpFoundation\Request\prepareBaseUrl().

◆ getBaseUrl() [2/2]

Symfony\Component\HttpFoundation\Request::getBaseUrl ( )

Returns the root URL from which this request is executed.

The base URL never ends with a /.

This is similar to getBasePath(), except that it also includes the script filename (e.g. index.php) if one exists.

Returns
string The raw URL (i.e. not urldecoded)

Definition at line 1045 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$baseUrl, and Symfony\Component\HttpFoundation\Request\prepareBaseUrl().

Referenced by Symfony\Component\HttpFoundation\Request\prepareBasePath(), and Symfony\Component\HttpFoundation\Request\preparePathInfo().

◆ getCharsets() [1/2]

Symfony\Component\HttpFoundation\Request::getCharsets ( )

Gets a list of charsets acceptable by the client browser.

Returns
array List of charsets in preferable order

Definition at line 1758 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$charsets, and Symfony\Component\HttpFoundation\AcceptHeader\fromString().

◆ getCharsets() [2/2]

Symfony\Component\HttpFoundation\Request::getCharsets ( )

Gets a list of charsets acceptable by the client browser.

Returns
array List of charsets in preferable order

Definition at line 1795 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$charsets, and Symfony\Component\HttpFoundation\AcceptHeader\fromString().

◆ getClientIp() [1/2]

Symfony\Component\HttpFoundation\Request::getClientIp ( )

Returns the client IP address.

This method can read the client IP address from the "X-Forwarded-For" header when trusted proxies were set via "setTrustedProxies()". The "X-Forwarded-For" header value is a comma+space separated list of IP addresses, the left-most being the original client, and each successive proxy that passed the request adding the IP address where it received the request from.

If your reverse proxy uses a different header name than "X-Forwarded-For", ("Client-Ip" for instance), configure it via the $trustedHeaderSet argument of the Request::setTrustedProxies() method instead.

Returns
string|null The client IP address
See also
getClientIps()
https://wikipedia.org/wiki/X-Forwarded-For

Definition at line 889 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\getClientIps().

◆ getClientIp() [2/2]

Symfony\Component\HttpFoundation\Request::getClientIp ( )

Returns the client IP address.

This method can read the client IP address from the "X-Forwarded-For" header when trusted proxies were set via "setTrustedProxies()". The "X-Forwarded-For" header value is a comma+space separated list of IP addresses, the left-most being the original client, and each successive proxy that passed the request adding the IP address where it received the request from.

If your reverse proxy uses a different header name than "X-Forwarded-For", ("Client-Ip" for instance), configure it via the $trustedHeaderSet argument of the Request::setTrustedProxies() method instead.

Returns
string|null The client IP address
See also
getClientIps()
http://en.wikipedia.org/wiki/X-Forwarded-For

Definition at line 974 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\getClientIps().

Referenced by Symfony\Component\HttpFoundation\ExpressionRequestMatcher\matches(), and Symfony\Component\HttpFoundation\RequestMatcher\matches().

◆ getClientIps() [1/2]

Symfony\Component\HttpFoundation\Request::getClientIps ( )

Returns the client IP addresses.

In the returned array the most trusted IP address is first, and the least trusted one last. The "real" client IP address is the last one, but this is also the least trusted one. Trusted proxies are stripped.

Use this method carefully; you should use getClientIp() instead.

Returns
array The client IP addresses
See also
getClientIp()

Definition at line 860 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\isFromTrustedProxy().

◆ getClientIps() [2/2]

Symfony\Component\HttpFoundation\Request::getClientIps ( )

Returns the client IP addresses.

In the returned array the most trusted IP address is first, and the least trusted one last. The "real" client IP address is the last one, but this is also the least trusted one. Trusted proxies are stripped.

Use this method carefully; you should use getClientIp() instead.

Returns
array The client IP addresses
See also
getClientIp()

Definition at line 945 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\isFromTrustedProxy().

Referenced by Symfony\Component\HttpFoundation\Request\getClientIp().

◆ getContent() [1/2]

Symfony\Component\HttpFoundation\Request::getContent (   $asResource = false)

Returns the request body content.

Parameters
bool$asResourceIf true, a resource will be returned
Returns
string|resource The request body content or a resource to read the body stream
Exceptions

Reimplemented in Symfony\Component\HttpFoundation\Tests\RequestContentProxy.

Definition at line 1599 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$content.

◆ getContent() [2/2]

Symfony\Component\HttpFoundation\Request::getContent (   $asResource = false)

Returns the request body content.

Parameters
bool$asResourceIf true, a resource will be returned
Returns
string|resource The request body content or a resource to read the body stream
Exceptions

Reimplemented in Symfony\Component\HttpFoundation\Tests\RequestContentProxy.

Definition at line 1656 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$content.

Referenced by Symfony\Component\HttpFoundation\Request\__toString().

◆ getContentType() [1/2]

Symfony\Component\HttpFoundation\Request::getContentType ( )

Gets the format associated with the request.

Returns
string|null The format (null if no content type is present)

Definition at line 1467 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\getFormat().

◆ getContentType() [2/2]

Symfony\Component\HttpFoundation\Request::getContentType ( )

Gets the format associated with the request.

Returns
string|null The format (null if no content type is present)

Definition at line 1542 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\getFormat().

◆ getDefaultLocale() [1/2]

Symfony\Component\HttpFoundation\Request::getDefaultLocale ( )

Get the default locale.

Returns
string

Definition at line 1491 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$defaultLocale.

◆ getDefaultLocale() [2/2]

Symfony\Component\HttpFoundation\Request::getDefaultLocale ( )

Get the default locale.

Returns
string

Definition at line 1566 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$defaultLocale.

◆ getEncodings() [1/2]

Symfony\Component\HttpFoundation\Request::getEncodings ( )

Gets a list of encodings acceptable by the client browser.

Returns
array List of encodings in preferable order

Definition at line 1772 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$encodings, and Symfony\Component\HttpFoundation\AcceptHeader\fromString().

◆ getEncodings() [2/2]

Symfony\Component\HttpFoundation\Request::getEncodings ( )

Gets a list of encodings acceptable by the client browser.

Returns
array List of encodings in preferable order

Definition at line 1809 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$encodings, and Symfony\Component\HttpFoundation\AcceptHeader\fromString().

◆ getETags() [1/2]

Symfony\Component\HttpFoundation\Request::getETags ( )

Gets the Etags.

Returns
array The entity tags

Definition at line 1642 of file vendor/symfony/http-foundation/Request.php.

◆ getETags() [2/2]

Symfony\Component\HttpFoundation\Request::getETags ( )

Gets the Etags.

Returns
array The entity tags

Definition at line 1702 of file lib/vendor/symfony/http-foundation/Request.php.

Referenced by Symfony\Component\HttpFoundation\Response\isNotModified().

◆ getFormat() [1/2]

Symfony\Component\HttpFoundation\Request::getFormat (   $mimeType)

Gets the format associated with the mime type.

Parameters
string$mimeTypeThe associated mime type
Returns
string|null The format (null if not found)

Definition at line 1390 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$format.

◆ getFormat() [2/2]

Symfony\Component\HttpFoundation\Request::getFormat (   $mimeType)

Gets the format associated with the mime type.

Parameters
string$mimeTypeThe associated mime type
Returns
string|null The format (null if not found)

Definition at line 1469 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$format.

Referenced by Symfony\Component\HttpFoundation\Request\getContentType(), and Symfony\Component\HttpFoundation\Request\getPreferredFormat().

◆ getHost() [1/2]

Symfony\Component\HttpFoundation\Request::getHost ( )

Returns the host name.

This method can read the client host name from the "X-Forwarded-Host" header when trusted proxies were set via "setTrustedProxies()".

The "X-Forwarded-Host" header must contain the client host name.

Returns
string
Exceptions
SuspiciousOperationExceptionwhen the host name is invalid or not trusted

Definition at line 1226 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\isFromTrustedProxy().

◆ getHost() [2/2]

Symfony\Component\HttpFoundation\Request::getHost ( )

Returns the host name.

This method can read the client host name from the "X-Forwarded-Host" header when trusted proxies were set via "setTrustedProxies()".

The "X-Forwarded-Host" header must contain the client host name.

If your reverse proxy uses a different header name than "X-Forwarded-Host", configure it via the $trustedHeaderSet argument of the Request::setTrustedProxies() method instead.

Returns
string
Exceptions
SuspiciousOperationExceptionwhen the host name is invalid or not trusted

Definition at line 1323 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\isFromTrustedProxy().

Referenced by Symfony\Component\HttpFoundation\Request\getHttpHost(), Symfony\Component\HttpFoundation\ExpressionRequestMatcher\matches(), and Symfony\Component\HttpFoundation\RequestMatcher\matches().

◆ getHttpHost() [1/2]

Symfony\Component\HttpFoundation\Request::getHttpHost ( )

Returns the HTTP host being requested.

The port name will be appended to the host if it's non-standard.

Returns
string

Definition at line 1056 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\getHost(), Symfony\Component\HttpFoundation\Request\getPort(), and Symfony\Component\HttpFoundation\Request\getScheme().

◆ getHttpHost() [2/2]

Symfony\Component\HttpFoundation\Request::getHttpHost ( )

Returns the HTTP host being requested.

The port name will be appended to the host if it's non-standard.

Returns
string

Definition at line 1145 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\getHost(), Symfony\Component\HttpFoundation\Request\getPort(), and Symfony\Component\HttpFoundation\Request\getScheme().

Referenced by Symfony\Component\HttpFoundation\Request\getSchemeAndHttpHost().

◆ getHttpMethodParameterOverride() [1/2]

static Symfony\Component\HttpFoundation\Request::getHttpMethodParameterOverride ( )
static

Checks whether support for the _method request parameter is enabled.

Returns
bool True when the _method request parameter is enabled, false otherwise

Definition at line 752 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$httpMethodParameterOverride.

◆ getHttpMethodParameterOverride() [2/2]

static Symfony\Component\HttpFoundation\Request::getHttpMethodParameterOverride ( )
static

Checks whether support for the _method request parameter is enabled.

Returns
bool True when the _method request parameter is enabled, false otherwise

Definition at line 850 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$httpMethodParameterOverride.

Referenced by Symfony\Component\HttpFoundation\Tests\RequestTest\testGetSetMethod().

◆ getLanguages() [1/2]

Symfony\Component\HttpFoundation\Request::getLanguages ( )

Gets a list of languages acceptable by the client browser.

Returns
array Languages ordered in the user browser preferences

Definition at line 1718 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$languages, and Symfony\Component\HttpFoundation\AcceptHeader\fromString().

◆ getLanguages() [2/2]

Symfony\Component\HttpFoundation\Request::getLanguages ( )

Gets a list of languages acceptable by the client browser.

Returns
array Languages ordered in the user browser preferences

Definition at line 1755 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$languages, and Symfony\Component\HttpFoundation\AcceptHeader\fromString().

Referenced by Symfony\Component\HttpFoundation\Request\getPreferredLanguage().

◆ getLocale() [1/2]

Symfony\Component\HttpFoundation\Request::getLocale ( )

Get the locale.

Returns
string

Definition at line 1511 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$locale.

◆ getLocale() [2/2]

Symfony\Component\HttpFoundation\Request::getLocale ( )

Get the locale.

Returns
string

Definition at line 1586 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$locale.

◆ getMethod() [1/2]

Symfony\Component\HttpFoundation\Request::getMethod ( )

Gets the request "intended" method.

If the X-HTTP-Method-Override header is set, and if the method is a POST, then it is used to determine the "real" intended HTTP method.

The _method request parameter can also be used to determine the HTTP method, but only if enableHttpMethodParameterOverride() has been called.

The method is always an uppercased string.

Returns
string The request method
See also
getRealMethod()

Definition at line 1304 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$method.

◆ getMethod() [2/2]

Symfony\Component\HttpFoundation\Request::getMethod ( )

Gets the request "intended" method.

If the X-HTTP-Method-Override header is set, and if the method is a POST, then it is used to determine the "real" intended HTTP method.

The _method request parameter can also be used to determine the HTTP method, but only if enableHttpMethodParameterOverride() has been called.

The method is always an uppercased string.

Returns
string The request method
See also
getRealMethod()

Definition at line 1401 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$method.

Referenced by Symfony\Component\HttpFoundation\Request\__toString(), Symfony\Component\HttpFoundation\Request\isMethod(), Symfony\Component\HttpFoundation\Request\isMethodCacheable(), Symfony\Component\HttpFoundation\Request\isMethodIdempotent(), Symfony\Component\HttpFoundation\Request\isMethodSafe(), Symfony\Component\HttpFoundation\ExpressionRequestMatcher\matches(), and Symfony\Component\HttpFoundation\RequestMatcher\matches().

◆ getMimeType() [1/2]

Symfony\Component\HttpFoundation\Request::getMimeType (   $format)

Gets the mime type associated with the format.

Parameters
string$formatThe format
Returns
string|null The associated mime type (null if not found)

Definition at line 1358 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$format.

◆ getMimeType() [2/2]

Symfony\Component\HttpFoundation\Request::getMimeType (   $format)

Gets the mime type associated with the format.

Parameters
string$formatThe format
Returns
string The associated mime type (null if not found)

Definition at line 1437 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$format.

Referenced by Symfony\Component\HttpFoundation\Response\prepare().

◆ getMimeTypes() [1/2]

static Symfony\Component\HttpFoundation\Request::getMimeTypes (   $format)
static

Gets the mime types associated with the format.

Parameters
string$formatThe format
Returns
array The associated mime types

Definition at line 1374 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$format.

◆ getMimeTypes() [2/2]

static Symfony\Component\HttpFoundation\Request::getMimeTypes (   $format)
static

Gets the mime types associated with the format.

Parameters
string$formatThe format
Returns
array The associated mime types

Definition at line 1453 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$format.

Referenced by Symfony\Component\HttpFoundation\Tests\RequestTest\testGetMimeTypesFromFormat(), and Symfony\Component\HttpFoundation\Tests\RequestTest\testGetMimeTypesFromInexistentFormat().

◆ getPassword() [1/2]

Symfony\Component\HttpFoundation\Request::getPassword ( )

Returns the password.

Returns
string|null

Definition at line 1027 of file vendor/symfony/http-foundation/Request.php.

◆ getPassword() [2/2]

Symfony\Component\HttpFoundation\Request::getPassword ( )

Returns the password.

Returns
string|null

Definition at line 1116 of file lib/vendor/symfony/http-foundation/Request.php.

Referenced by Symfony\Component\HttpFoundation\Request\getUserInfo().

◆ getPathInfo() [1/2]

Symfony\Component\HttpFoundation\Request::getPathInfo ( )

Returns the path being requested relative to the executed script.

The path info always starts with a /.

Suppose this request is instantiated from /mysite on localhost:

Returns
string The raw path (i.e. not urldecoded)

Definition at line 920 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$pathInfo, and Symfony\Component\HttpFoundation\Request\preparePathInfo().

◆ getPathInfo() [2/2]

Symfony\Component\HttpFoundation\Request::getPathInfo ( )

Returns the path being requested relative to the executed script.

The path info always starts with a /.

Suppose this request is instantiated from /mysite on localhost:

Returns
string The raw path (i.e. not urldecoded)

Definition at line 1005 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$pathInfo, and Symfony\Component\HttpFoundation\Request\preparePathInfo().

Referenced by Symfony\Component\HttpFoundation\Request\getRelativeUriForPath(), Symfony\Component\HttpFoundation\ExpressionRequestMatcher\matches(), and Symfony\Component\HttpFoundation\RequestMatcher\matches().

◆ getPort() [1/2]

Symfony\Component\HttpFoundation\Request::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.

Returns
int|string can be a string if fetched from the server bag

Definition at line 989 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\getScheme(), and Symfony\Component\HttpFoundation\Request\isFromTrustedProxy().

◆ getPort() [2/2]

Symfony\Component\HttpFoundation\Request::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 via the $trustedHeaderSet argument of the Request::setTrustedProxies() method instead.

Returns
int|string can be a string if fetched from the server bag

Definition at line 1078 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\getScheme(), and Symfony\Component\HttpFoundation\Request\isFromTrustedProxy().

Referenced by Symfony\Component\HttpFoundation\Request\getHttpHost(), and Symfony\Component\HttpFoundation\RequestMatcher\matches().

◆ getPreferredFormat()

Symfony\Component\HttpFoundation\Request::getPreferredFormat ( ?string  $default = 'html')

Gets the preferred format for the response by inspecting, in the following order:

  • the request format set using setRequestFormat
  • the values of the Accept HTTP header

Note that if you use this method, you should send the "Vary: Accept" header in the response to prevent any issues with intermediary HTTP caches.

Definition at line 1663 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\getAcceptableContentTypes(), Symfony\Component\HttpFoundation\Request\getFormat(), and Symfony\Component\HttpFoundation\Request\getRequestFormat().

◆ getPreferredLanguage() [1/2]

Symfony\Component\HttpFoundation\Request::getPreferredLanguage ( array  $locales = null)

Returns the preferred language.

Parameters
string[]$localesAn array of ordered available locales
Returns
string|null The preferred locale

Definition at line 1685 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\getLanguages().

◆ getPreferredLanguage() [2/2]

Symfony\Component\HttpFoundation\Request::getPreferredLanguage ( array  $locales = null)

Returns the preferred language.

Parameters
array$localesAn array of ordered available locales
Returns
string|null The preferred locale

Definition at line 1722 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\getLanguages().

◆ getProtocolVersion()

Symfony\Component\HttpFoundation\Request::getProtocolVersion ( )

Returns the protocol version.

If the application is behind a proxy, the protocol version used in the requests between the client and the proxy and between the proxy and the server might be different. This returns the former (from the "Via" header) if the proxy is trusted (see "setTrustedProxies()"), otherwise it returns the latter (from the "SERVER_PROTOCOL" server parameter).

Returns
string

Definition at line 1577 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\isFromTrustedProxy().

◆ getQueryString() [1/2]

Symfony\Component\HttpFoundation\Request::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.

Returns
string|null A normalized query string for the Request

Definition at line 1186 of file vendor/symfony/http-foundation/Request.php.

◆ getQueryString() [2/2]

Symfony\Component\HttpFoundation\Request::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.

Returns
string|null A normalized query string for the Request

Definition at line 1275 of file lib/vendor/symfony/http-foundation/Request.php.

Referenced by Symfony\Component\HttpFoundation\Request\getUri().

◆ getRealMethod() [1/2]

Symfony\Component\HttpFoundation\Request::getRealMethod ( )

Gets the "real" request method.

Returns
string The request method
See also
getMethod()

Definition at line 1346 of file vendor/symfony/http-foundation/Request.php.

◆ getRealMethod() [2/2]

Symfony\Component\HttpFoundation\Request::getRealMethod ( )

Gets the "real" request method.

Returns
string The request method
See also
getMethod()

Definition at line 1425 of file lib/vendor/symfony/http-foundation/Request.php.

◆ getRelativeUriForPath() [1/2]

Symfony\Component\HttpFoundation\Request::getRelativeUriForPath (   $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 "/a/b/c/d":

  • "/a/b/c/d" -> ""
  • "/a/b/c/" -> "./"
  • "/a/b/" -> "../"
  • "/a/b/c/other" -> "other"
  • "/a/x/y" -> "../../x/y"
Parameters
string$pathThe target path
Returns
string The relative target path

Definition at line 1142 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$basePath, and Symfony\Component\HttpFoundation\Request\getPathInfo().

◆ getRelativeUriForPath() [2/2]

Symfony\Component\HttpFoundation\Request::getRelativeUriForPath (   $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 "/a/b/c/d":

  • "/a/b/c/d" -> ""
  • "/a/b/c/" -> "./"
  • "/a/b/" -> "../"
  • "/a/b/c/other" -> "other"
  • "/a/x/y" -> "../../x/y"
Parameters
string$pathThe target path
Returns
string The relative target path

Definition at line 1231 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$basePath, and Symfony\Component\HttpFoundation\Request\getPathInfo().

◆ getRequestFormat() [1/2]

Symfony\Component\HttpFoundation\Request::getRequestFormat (   $default = 'html')

Gets the request format.

Here is the process to determine the format:

See also
getPreferredFormat
Parameters
string | null$defaultThe default format
Returns
string|null The request format

Definition at line 1443 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$format.

◆ getRequestFormat() [2/2]

Symfony\Component\HttpFoundation\Request::getRequestFormat (   $default = 'html')

Gets the request format.

Here is the process to determine the format:

Parameters
string$defaultThe default format
Returns
string The request format

Definition at line 1518 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$format.

Referenced by Symfony\Component\HttpFoundation\Request\duplicate(), Symfony\Component\HttpFoundation\Request\getPreferredFormat(), and Symfony\Component\HttpFoundation\Response\prepare().

◆ getRequestUri() [1/2]

Symfony\Component\HttpFoundation\Request::getRequestUri ( )

Returns the requested URI (path and query string).

Returns
string The raw URI (i.e. not URI decoded)

Definition at line 1073 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$requestUri, and Symfony\Component\HttpFoundation\Request\prepareRequestUri().

◆ getRequestUri() [2/2]

Symfony\Component\HttpFoundation\Request::getRequestUri ( )

◆ getScheme() [1/2]

Symfony\Component\HttpFoundation\Request::getScheme ( )

Gets the request's scheme.

Returns
string

Definition at line 974 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\isSecure().

◆ getScheme() [2/2]

◆ getSchemeAndHttpHost() [1/2]

Symfony\Component\HttpFoundation\Request::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.

Returns
string The scheme and HTTP host

Definition at line 1090 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\getHttpHost(), and Symfony\Component\HttpFoundation\Request\getScheme().

◆ getSchemeAndHttpHost() [2/2]

Symfony\Component\HttpFoundation\Request::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.

Returns
string The scheme and HTTP host

Definition at line 1179 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\getHttpHost(), and Symfony\Component\HttpFoundation\Request\getScheme().

Referenced by Symfony\Component\HttpFoundation\Request\getUri(), Symfony\Component\HttpFoundation\Request\getUriForPath(), and Symfony\Component\HttpFoundation\Request\prepareRequestUri().

◆ getScriptName() [1/2]

Symfony\Component\HttpFoundation\Request::getScriptName ( )

Returns current script name.

Returns
string

Definition at line 901 of file vendor/symfony/http-foundation/Request.php.

◆ getScriptName() [2/2]

Symfony\Component\HttpFoundation\Request::getScriptName ( )

Returns current script name.

Returns
string

Definition at line 986 of file lib/vendor/symfony/http-foundation/Request.php.

◆ getSession() [1/2]

Symfony\Component\HttpFoundation\Request::getSession ( )

◆ getSession() [2/2]

Symfony\Component\HttpFoundation\Request::getSession ( )

Gets the Session.

Returns
SessionInterface|null The session

Definition at line 891 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$session.

Referenced by Symfony\Component\HttpFoundation\Request\hasPreviousSession().

◆ getTrustedHeaderName()

static Symfony\Component\HttpFoundation\Request::getTrustedHeaderName (   $key)
static

Gets the trusted proxy header name.

Parameters
string$keyThe header key
Returns
string The header name
Exceptions

Definition at line 773 of file lib/vendor/symfony/http-foundation/Request.php.

Referenced by Symfony\Component\HttpFoundation\Tests\RequestTest\testGetTrustedHeaderName(), and Symfony\Component\HttpFoundation\Tests\RequestTest\testGetTrustedProxiesInvalidHeaderName().

◆ getTrustedHeaderSet() [1/2]

static Symfony\Component\HttpFoundation\Request::getTrustedHeaderSet ( )
static

Gets the set of trusted headers from trusted proxies.

Returns
int A bit field of Request::HEADER_* that defines which headers are trusted from your proxies

Definition at line 678 of file vendor/symfony/http-foundation/Request.php.

◆ getTrustedHeaderSet() [2/2]

static Symfony\Component\HttpFoundation\Request::getTrustedHeaderSet ( )
static

Gets the set of trusted headers from trusted proxies.

Returns
int A bit field of Request::HEADER_* that defines which headers are trusted from your proxies

Definition at line 683 of file lib/vendor/symfony/http-foundation/Request.php.

◆ getTrustedHosts() [1/2]

static Symfony\Component\HttpFoundation\Request::getTrustedHosts ( )
static

Gets the list of trusted host patterns.

Returns
array An array of trusted host patterns

Definition at line 704 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$trustedHostPatterns.

◆ getTrustedHosts() [2/2]

static Symfony\Component\HttpFoundation\Request::getTrustedHosts ( )
static

Gets the list of trusted host patterns.

Returns
array An array of trusted host patterns

Definition at line 709 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$trustedHostPatterns.

◆ getTrustedProxies() [1/2]

static Symfony\Component\HttpFoundation\Request::getTrustedProxies ( )
static

Gets the list of trusted proxies.

Returns
array An array of trusted proxies

Definition at line 668 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$trustedProxies.

◆ getTrustedProxies() [2/2]

static Symfony\Component\HttpFoundation\Request::getTrustedProxies ( )
static

Gets the list of trusted proxies.

Returns
array An array of trusted proxies

Definition at line 673 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$trustedProxies.

◆ getUri() [1/2]

Symfony\Component\HttpFoundation\Request::getUri ( )

Generates a normalized URI (URL) for the Request.

Returns
string A normalized URI (URL) for the Request
See also
getQueryString()

Definition at line 1102 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\getQueryString(), and Symfony\Component\HttpFoundation\Request\getSchemeAndHttpHost().

◆ getUri() [2/2]

Symfony\Component\HttpFoundation\Request::getUri ( )

Generates a normalized URI (URL) for the Request.

Returns
string A normalized URI (URL) for the Request
See also
getQueryString()

Definition at line 1191 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\getQueryString(), and Symfony\Component\HttpFoundation\Request\getSchemeAndHttpHost().

◆ getUriForPath() [1/2]

Symfony\Component\HttpFoundation\Request::getUriForPath (   $path)

Generates a normalized URI for the given path.

Parameters
string$pathA path to use instead of the current one
Returns
string The normalized URI for the path

Definition at line 1118 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\getSchemeAndHttpHost().

◆ getUriForPath() [2/2]

Symfony\Component\HttpFoundation\Request::getUriForPath (   $path)

Generates a normalized URI for the given path.

Parameters
string$pathA path to use instead of the current one
Returns
string The normalized URI for the path

Definition at line 1207 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\getSchemeAndHttpHost().

◆ getUser() [1/2]

Symfony\Component\HttpFoundation\Request::getUser ( )

Returns the user.

Returns
string|null

Definition at line 1017 of file vendor/symfony/http-foundation/Request.php.

◆ getUser() [2/2]

Symfony\Component\HttpFoundation\Request::getUser ( )

Returns the user.

Returns
string|null

Definition at line 1106 of file lib/vendor/symfony/http-foundation/Request.php.

Referenced by Symfony\Component\HttpFoundation\Request\getUserInfo().

◆ getUserInfo() [1/2]

Symfony\Component\HttpFoundation\Request::getUserInfo ( )

Gets the user info.

Returns
string A user name and, optionally, scheme-specific information about how to gain authorization to access the server

Definition at line 1037 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\getPassword(), and Symfony\Component\HttpFoundation\Request\getUser().

◆ getUserInfo() [2/2]

Symfony\Component\HttpFoundation\Request::getUserInfo ( )

Gets the user info.

Returns
string A user name and, optionally, scheme-specific information about how to gain authorization to access the server

Definition at line 1126 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\getPassword(), and Symfony\Component\HttpFoundation\Request\getUser().

◆ hasPreviousSession() [1/2]

Symfony\Component\HttpFoundation\Request::hasPreviousSession ( )

Whether the request contains a Session which was started in one of the previous requests.

Returns
bool

Definition at line 814 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\getSession(), and Symfony\Component\HttpFoundation\Request\hasSession().

◆ hasPreviousSession() [2/2]

Symfony\Component\HttpFoundation\Request::hasPreviousSession ( )

Whether the request contains a Session which was started in one of the previous requests.

Returns
bool

Definition at line 902 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\hasSession().

◆ hasSession() [1/2]

Symfony\Component\HttpFoundation\Request::hasSession ( )

Whether the request contains a Session object.

This method does not give any information about the state of the session object, like whether the session is started or not. It is just a way to check if this Request is associated with a Session instance.

Returns
bool true when the Request contains a Session object, false otherwise

Definition at line 829 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$session.

◆ hasSession() [2/2]

Symfony\Component\HttpFoundation\Request::hasSession ( )

Whether the request contains a Session object.

This method does not give any information about the state of the session object, like whether the session is started or not. It is just a way to check if this Request is associated with a Session instance.

Returns
bool true when the Request contains a Session object, false otherwise

Definition at line 917 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$session.

Referenced by Symfony\Component\HttpFoundation\Request\hasPreviousSession().

◆ initialize() [1/2]

Symfony\Component\HttpFoundation\Request::initialize ( array  $query = [],
array  $request = [],
array  $attributes = [],
array  $cookies = [],
array  $files = [],
array  $server = [],
  $content = null 
)

Sets the parameters for this request.

This method also re-initializes all properties.

Parameters
array$queryThe GET parameters
array$requestThe POST parameters
array$attributesThe request attributes (parameters parsed from the PATH_INFO, ...)
array$cookiesThe COOKIE parameters
array$filesThe FILES parameters
array$serverThe SERVER parameters
string | resource | null$contentThe raw body data

Definition at line 329 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$attributes, Symfony\Component\HttpFoundation\Request\$content, Symfony\Component\HttpFoundation\Request\$cookies, Symfony\Component\HttpFoundation\Request\$files, Symfony\Component\HttpFoundation\Request\$query, Symfony\Component\HttpFoundation\Request\$request, and Symfony\Component\HttpFoundation\Request\$server.

◆ initialize() [2/2]

Symfony\Component\HttpFoundation\Request::initialize ( array  $query = array(),
array  $request = array(),
array  $attributes = array(),
array  $cookies = array(),
array  $files = array(),
array  $server = array(),
  $content = null 
)

Sets the parameters for this request.

This method also re-initializes all properties.

Parameters
array$queryThe GET parameters
array$requestThe POST parameters
array$attributesThe request attributes (parameters parsed from the PATH_INFO, ...)
array$cookiesThe COOKIE parameters
array$filesThe FILES parameters
array$serverThe SERVER parameters
string | resource$contentThe raw body data

Definition at line 337 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$attributes, Symfony\Component\HttpFoundation\Request\$content, Symfony\Component\HttpFoundation\Request\$cookies, Symfony\Component\HttpFoundation\Request\$files, Symfony\Component\HttpFoundation\Request\$query, Symfony\Component\HttpFoundation\Request\$request, and Symfony\Component\HttpFoundation\Request\$server.

Referenced by Symfony\Component\HttpFoundation\Request\__construct().

◆ initializeFormats() [1/2]

static Symfony\Component\HttpFoundation\Request::initializeFormats ( )
staticprotected

Initializes HTTP request formats.

Definition at line 1993 of file vendor/symfony/http-foundation/Request.php.

◆ initializeFormats() [2/2]

static Symfony\Component\HttpFoundation\Request::initializeFormats ( )
staticprotected

Initializes HTTP request formats.

Definition at line 2021 of file lib/vendor/symfony/http-foundation/Request.php.

◆ isFromTrustedProxy() [1/2]

Symfony\Component\HttpFoundation\Request::isFromTrustedProxy ( )

Indicates whether this request originated from a trusted proxy.

This can be useful to determine whether or not to trust the contents of a proxy-specific header.

Returns
bool true if the request came from a trusted proxy, false otherwise

Definition at line 2065 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\IpUtils\checkIp().

◆ isFromTrustedProxy() [2/2]

Symfony\Component\HttpFoundation\Request::isFromTrustedProxy ( )

Indicates whether this request originated from a trusted proxy.

This can be useful to determine whether or not to trust the contents of a proxy-specific header.

Returns
bool true if the request came from a trusted proxy, false otherwise

Definition at line 2102 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\IpUtils\checkIp().

Referenced by Symfony\Component\HttpFoundation\Request\getClientIps(), Symfony\Component\HttpFoundation\Request\getHost(), Symfony\Component\HttpFoundation\Request\getPort(), Symfony\Component\HttpFoundation\Request\getProtocolVersion(), and Symfony\Component\HttpFoundation\Request\isSecure().

◆ isMethod() [1/2]

Symfony\Component\HttpFoundation\Request::isMethod (   $method)

Checks if the request method is of specified type.

Parameters
string$methodUppercase request method (GET, POST etc)
Returns
bool

Definition at line 1523 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$method, and Symfony\Component\HttpFoundation\Request\getMethod().

◆ isMethod() [2/2]

Symfony\Component\HttpFoundation\Request::isMethod (   $method)

Checks if the request method is of specified type.

Parameters
string$methodUppercase request method (GET, POST etc)
Returns
bool

Definition at line 1598 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$method, and Symfony\Component\HttpFoundation\Request\getMethod().

Referenced by Symfony\Component\HttpFoundation\Response\prepare().

◆ isMethodCacheable() [1/2]

Symfony\Component\HttpFoundation\Request::isMethodCacheable ( )

Checks whether the method is cacheable or not.

See also
https://tools.ietf.org/html/rfc7231#section-4.2.3
Returns
bool True for GET and HEAD, false otherwise

Definition at line 1561 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\getMethod().

◆ isMethodCacheable() [2/2]

Symfony\Component\HttpFoundation\Request::isMethodCacheable ( )

◆ isMethodIdempotent() [1/2]

Symfony\Component\HttpFoundation\Request::isMethodIdempotent ( )

Checks whether or not the method is idempotent.

Returns
bool

Definition at line 1549 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\getMethod().

◆ isMethodIdempotent() [2/2]

Symfony\Component\HttpFoundation\Request::isMethodIdempotent ( )

Checks whether or not the method is idempotent.

Returns
bool

Definition at line 1630 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\getMethod().

◆ isMethodSafe() [1/2]

Symfony\Component\HttpFoundation\Request::isMethodSafe ( )

Checks whether or not the method is safe.

See also
https://tools.ietf.org/html/rfc7231#section-4.2.1
Returns
bool

Definition at line 1535 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\getMethod().

◆ isMethodSafe() [2/2]

Symfony\Component\HttpFoundation\Request::isMethodSafe ( )

Checks whether or not the method is safe.

See also
https://tools.ietf.org/html/rfc7231#section-4.2.1
Parameters
bool$andCacheableAdds the additional condition that the method should be cacheable. True by default.
Returns
bool

Definition at line 1612 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\getMethod().

Referenced by Symfony\Component\HttpFoundation\BinaryFileResponse\prepare().

◆ isNoCache() [1/2]

Symfony\Component\HttpFoundation\Request::isNoCache ( )
Returns
bool

Definition at line 1650 of file vendor/symfony/http-foundation/Request.php.

◆ isNoCache() [2/2]

Symfony\Component\HttpFoundation\Request::isNoCache ( )
Returns
bool

Definition at line 1710 of file lib/vendor/symfony/http-foundation/Request.php.

◆ isSecure() [1/2]

Symfony\Component\HttpFoundation\Request::isSecure ( )

Checks whether the request is secure or not.

This method can read the client protocol from the "X-Forwarded-Proto" header when trusted proxies were set via "setTrustedProxies()".

The "X-Forwarded-Proto" header must contain the protocol: "https" or "http".

Returns
bool

Definition at line 1203 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\isFromTrustedProxy().

◆ isSecure() [2/2]

Symfony\Component\HttpFoundation\Request::isSecure ( )

Checks whether the request is secure or not.

This method can read the client protocol from the "X-Forwarded-Proto" header when trusted proxies were set via "setTrustedProxies()".

The "X-Forwarded-Proto" header must contain the protocol: "https" or "http".

If your reverse proxy uses a different header name than "X-Forwarded-Proto" ("SSL_HTTPS" for instance), configure it via the $trustedHeaderSet argument of the Request::setTrustedProxies() method instead.

Returns
bool

Definition at line 1296 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\isFromTrustedProxy().

Referenced by Symfony\Component\HttpFoundation\Response\ensureIEOverSSLCompatibility(), Symfony\Component\HttpFoundation\Request\getScheme(), and Symfony\Component\HttpFoundation\Response\prepare().

◆ isXmlHttpRequest() [1/2]

Symfony\Component\HttpFoundation\Request::isXmlHttpRequest ( )

Returns true if the request is a XMLHttpRequest.

It works if your JavaScript library sets an X-Requested-With HTTP header. It is known to work with common JavaScript frameworks:

See also
https://wikipedia.org/wiki/List_of_Ajax_frameworks#JavaScript
Returns
bool true if the request is an XMLHttpRequest, false otherwise

Definition at line 1805 of file vendor/symfony/http-foundation/Request.php.

◆ isXmlHttpRequest() [2/2]

Symfony\Component\HttpFoundation\Request::isXmlHttpRequest ( )

Returns true if the request is a XMLHttpRequest.

It works if your JavaScript library sets an X-Requested-With HTTP header. It is known to work with common JavaScript frameworks:

See also
http://en.wikipedia.org/wiki/List_of_Ajax_frameworks#JavaScript
Returns
bool true if the request is an XMLHttpRequest, false otherwise

Definition at line 1842 of file lib/vendor/symfony/http-foundation/Request.php.

◆ normalizeQueryString() [1/2]

static Symfony\Component\HttpFoundation\Request::normalizeQueryString (   $qs)
static

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$qsQuery string
Returns
string A normalized query string for the Request

Definition at line 719 of file vendor/symfony/http-foundation/Request.php.

◆ normalizeQueryString() [2/2]

static Symfony\Component\HttpFoundation\Request::normalizeQueryString (   $qs)
static

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$qsQuery string
Returns
string A normalized query string for the Request

Definition at line 796 of file lib/vendor/symfony/http-foundation/Request.php.

◆ overrideGlobals() [1/2]

Symfony\Component\HttpFoundation\Request::overrideGlobals ( )

Overrides the PHP global variables according to this request instance.

It overrides $_GET, $_POST, $_REQUEST, $_SERVER, $_COOKIE. $_FILES is never overridden, see rfc1867

Definition at line 607 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$request.

◆ overrideGlobals() [2/2]

Symfony\Component\HttpFoundation\Request::overrideGlobals ( )

Overrides the PHP global variables according to this request instance.

It overrides $_GET, $_POST, $_REQUEST, $_SERVER, $_COOKIE. $_FILES is never overridden, see rfc1867

Definition at line 612 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$request.

◆ prepareBasePath() [1/2]

Symfony\Component\HttpFoundation\Request::prepareBasePath ( )
protected

◆ prepareBasePath() [2/2]

Symfony\Component\HttpFoundation\Request::prepareBasePath ( )
protected

◆ prepareBaseUrl() [1/2]

◆ prepareBaseUrl() [2/2]

◆ preparePathInfo() [1/2]

◆ preparePathInfo() [2/2]

◆ prepareRequestUri() [1/2]

Symfony\Component\HttpFoundation\Request::prepareRequestUri ( )
protected

◆ prepareRequestUri() [2/2]

◆ setDefaultLocale() [1/2]

Symfony\Component\HttpFoundation\Request::setDefaultLocale (   $locale)

Sets the default locale.

Parameters
string$locale

Definition at line 1477 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$locale.

◆ setDefaultLocale() [2/2]

Symfony\Component\HttpFoundation\Request::setDefaultLocale (   $locale)

Sets the default locale.

Parameters
string$locale

Definition at line 1552 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$locale.

◆ setFactory() [1/2]

static Symfony\Component\HttpFoundation\Request::setFactory (   $callable)
static

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$callableA PHP callable

Definition at line 488 of file vendor/symfony/http-foundation/Request.php.

◆ setFactory() [2/2]

static Symfony\Component\HttpFoundation\Request::setFactory (   $callable)
static

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$callableA PHP callable

Definition at line 509 of file lib/vendor/symfony/http-foundation/Request.php.

Referenced by Symfony\Component\HttpFoundation\Tests\RequestTest\testFactory().

◆ setFormat() [1/2]

Symfony\Component\HttpFoundation\Request::setFormat (   $format,
  $mimeTypes 
)

Associates a format with mime types.

Parameters
string$formatThe format
string | array$mimeTypesThe associated mime types (the preferred one must be the first as it will be used as the content type)

Definition at line 1419 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$format.

◆ setFormat() [2/2]

Symfony\Component\HttpFoundation\Request::setFormat (   $format,
  $mimeTypes 
)

Associates a format with mime types.

Parameters
string$formatThe format
string | array$mimeTypesThe associated mime types (the preferred one must be the first as it will be used as the content type)

Definition at line 1496 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$format.

◆ setLocale() [1/2]

Symfony\Component\HttpFoundation\Request::setLocale (   $locale)

Sets the locale.

Parameters
string$locale

Definition at line 1501 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$locale.

◆ setLocale() [2/2]

Symfony\Component\HttpFoundation\Request::setLocale (   $locale)

Sets the locale.

Parameters
string$locale

Definition at line 1576 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$locale.

◆ setMethod() [1/2]

Symfony\Component\HttpFoundation\Request::setMethod (   $method)

Sets the request method.

Parameters
string$method

Definition at line 1283 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$method.

◆ setMethod() [2/2]

Symfony\Component\HttpFoundation\Request::setMethod (   $method)

Sets the request method.

Parameters
string$method

Definition at line 1380 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$method.

◆ setRequestFormat() [1/2]

Symfony\Component\HttpFoundation\Request::setRequestFormat (   $format)

Sets the request format.

Parameters
string$formatThe request format

Definition at line 1457 of file vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$format.

◆ setRequestFormat() [2/2]

Symfony\Component\HttpFoundation\Request::setRequestFormat (   $format)

Sets the request format.

Parameters
string$formatThe request format

Definition at line 1532 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$format.

◆ setSession() [1/2]

Symfony\Component\HttpFoundation\Request::setSession ( SessionInterface  $session)

◆ setSession() [2/2]

Symfony\Component\HttpFoundation\Request::setSession ( SessionInterface  $session)

Sets the Session.

Parameters
SessionInterface$sessionThe Session

Definition at line 927 of file lib/vendor/symfony/http-foundation/Request.php.

References Symfony\Component\HttpFoundation\Request\$session.

Referenced by Symfony\Component\HttpFoundation\Request\getSession().

◆ setSessionFactory()

Symfony\Component\HttpFoundation\Request::setSessionFactory ( callable  $factory)

Definition at line 842 of file vendor/symfony/http-foundation/Request.php.

◆ setTrustedHeaderName()

static Symfony\Component\HttpFoundation\Request::setTrustedHeaderName (   $key,
  $value 
)
static

◆ setTrustedHosts() [1/2]

static Symfony\Component\HttpFoundation\Request::setTrustedHosts ( array  $hostPatterns)
static

Sets a list of trusted host patterns.

You should only list the hosts you manage using regexs.

Parameters
array$hostPatternsA list of trusted host patterns

Definition at line 690 of file vendor/symfony/http-foundation/Request.php.

◆ setTrustedHosts() [2/2]

static Symfony\Component\HttpFoundation\Request::setTrustedHosts ( array  $hostPatterns)
static

Sets a list of trusted host patterns.

You should only list the hosts you manage using regexs.

Parameters
array$hostPatternsA list of trusted host patterns

Definition at line 695 of file lib/vendor/symfony/http-foundation/Request.php.

Referenced by Symfony\Component\HttpFoundation\Tests\RequestTest\testTrustedHosts().

◆ setTrustedProxies() [1/2]

◆ setTrustedProxies() [2/2]

static Symfony\Component\HttpFoundation\Request::setTrustedProxies ( array  $proxies,
int  $trustedHeaderSet 
)
static

Sets a list of trusted proxies.

You should only list the reverse proxies that you manage directly.

Parameters
array$proxiesA list of trusted proxies, the string 'REMOTE_ADDR' will be replaced with $_SERVER['REMOTE_ADDR']
int$trustedHeaderSetA bit field of Request::HEADER_*, to set which headers to trust from your proxies
Exceptions

Definition at line 649 of file vendor/symfony/http-foundation/Request.php.

Field Documentation

◆ $acceptableContentTypes

array Request::$acceptableContentTypes
protected

◆ $attributes

◆ $basePath

◆ $baseUrl

◆ $charsets

array Request::$charsets
protected

◆ $content

◆ $cookies

◆ $defaultLocale

string Request::$defaultLocale = 'en'
protected

◆ $encodings

array Request::$encodings
protected

◆ $files

◆ $format

◆ $formats

static Request::$formats
staticprotected

◆ $headers

HeaderBag Request::$headers

Headers (taken from the $_SERVER).

Definition at line 165 of file lib/vendor/symfony/http-foundation/Request.php.

Referenced by Symfony\Component\HttpFoundation\Request\__clone().

◆ $httpMethodParameterOverride

static Request::$httpMethodParameterOverride = false
staticprotected

◆ $languages

array Request::$languages
protected

◆ $locale

◆ $method

◆ $pathInfo

◆ $query

◆ $request

◆ $requestFactory

static Request::$requestFactory
staticprotected

◆ $requestUri

◆ $server

◆ $session

◆ $trustedHeaders

static Request::$trustedHeaders
staticprotected
Initial value:
= array(
self::HEADER_FORWARDED => 'FORWARDED',
self::HEADER_CLIENT_IP => 'X_FORWARDED_FOR',
self::HEADER_CLIENT_HOST => 'X_FORWARDED_HOST',
self::HEADER_CLIENT_PROTO => 'X_FORWARDED_PROTO',
self::HEADER_CLIENT_PORT => 'X_FORWARDED_PORT',
)

Names for headers that can be trusted when using trusted proxies.

The FORWARDED header is the standard as of rfc7239.

The other headers are non-standard, but widely used by popular reverse proxies (like Apache mod_proxy or Amazon EC2).

Deprecated:
since version 3.3, to be removed in 4.0

Names for headers that can be trusted when using trusted proxies.

The FORWARDED header is the standard as of rfc7239.

The other headers are non-standard, but widely used by popular reverse proxies (like Apache mod_proxy or Amazon EC2).

Definition at line 88 of file lib/vendor/symfony/http-foundation/Request.php.

◆ $trustedHostPatterns

static Request::$trustedHostPatterns = array()
staticprotected

◆ $trustedHosts

static Request::$trustedHosts = array()
staticprotected

◆ $trustedProxies

static Request::$trustedProxies = array()
staticprotected

◆ HEADER_CLIENT_HOST

const Symfony\Component\HttpFoundation\Request::HEADER_CLIENT_HOST = self::HEADER_X_FORWARDED_HOST

◆ HEADER_CLIENT_IP

const Symfony\Component\HttpFoundation\Request::HEADER_CLIENT_IP = self::HEADER_X_FORWARDED_FOR

◆ HEADER_CLIENT_PORT

const Symfony\Component\HttpFoundation\Request::HEADER_CLIENT_PORT = self::HEADER_X_FORWARDED_PORT

◆ HEADER_CLIENT_PROTO

const Symfony\Component\HttpFoundation\Request::HEADER_CLIENT_PROTO = self::HEADER_X_FORWARDED_PROTO

◆ HEADER_FORWARDED

◆ HEADER_X_FORWARDED_ALL

◆ HEADER_X_FORWARDED_AWS_ELB

const Request::HEADER_X_FORWARDED_AWS_ELB = 0b11010

◆ HEADER_X_FORWARDED_FOR

const Request::HEADER_X_FORWARDED_FOR = 0b00010

◆ HEADER_X_FORWARDED_HOST

const Request::HEADER_X_FORWARDED_HOST = 0b00100

◆ HEADER_X_FORWARDED_PORT

const Request::HEADER_X_FORWARDED_PORT = 0b10000

◆ HEADER_X_FORWARDED_PROTO

const Request::HEADER_X_FORWARDED_PROTO = 0b01000

◆ METHOD_CONNECT

const Request::METHOD_CONNECT = 'CONNECT'

◆ METHOD_DELETE

const Request::METHOD_DELETE = 'DELETE'

◆ METHOD_GET

const Request::METHOD_GET = 'GET'

◆ METHOD_HEAD

const Request::METHOD_HEAD = 'HEAD'

◆ METHOD_OPTIONS

const Request::METHOD_OPTIONS = 'OPTIONS'

◆ METHOD_PATCH

const Request::METHOD_PATCH = 'PATCH'

◆ METHOD_POST

const Request::METHOD_POST = 'POST'

◆ METHOD_PURGE

const Request::METHOD_PURGE = 'PURGE'

◆ METHOD_PUT

const Request::METHOD_PUT = 'PUT'

◆ METHOD_TRACE

const Request::METHOD_TRACE = 'TRACE'

The documentation for this class was generated from the following file: