Frontend | Backend | Api

Request (Api)

Helper for getting information about the request. Can be access with $_request

Property Description Returns
locale Get the locale for the request in the form of language-COUNTRY, for example "en-US". Might have been overriden by a user- or session-specific locale. string
language Get the language for the request as two-char string, for example "en". Might have been influenced by a user- or session-specific locale. string
hostname Get the http hostname string
scheme Get the scheme excluding colon or double slash string
schemeAndHost Get the scheme and http host string
method Get the method used in the request as upperscore string string
cookies Get the cookies from the request array
path Get the path for the Request with url entities decoded, e.g. /de%20homepage?abc=def => /de homepage string
queryString Get query string of the request; for "/search/tours?fields.tourType=past" the "fields.tourType=past" is returned string
parameters Get the query parameters from the request array
pdfRequest Check if a request is a PDF request bool