Request::isNoCache()

bool isNoCache() Return Value bool

Request::isMethodSafe()

bool isMethodSafe() Checks whether the method is safe or not. Return Value bool

Request::isXmlHttpRequest()

bool 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: Return Value bool true if the request is an XMLHttpRequest, false otherwise

Request::isSecure()

bool 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 "setTrustedHeaderName()" with the "client-proto" key. Return Value bool

Request::initialize()

initialize(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), string|resource $content = null) Sets the parameters for this request. This method also re-initializes all properties. Parameters array $query The GET parameters array $request The POST parameters array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) array $cookies The COOKIE parameters ar

Request::isMethod()

bool isMethod(string $method) Checks if the request method is of specified type. Parameters string $method Uppercase request method (GET, POST etc) Return Value bool

Request::isMethodCacheable()

bool isMethodCacheable() Checks whether the method is cacheable or not. Return Value bool

Request::isFromTrustedProxy()

bool 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. Return Value bool true if the request came from a trusted proxy, false otherwise

Request::hasSession()

bool 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. Return Value bool true when the Request contains a Session object, false otherwise

Request::getUser()

string|null getUser() Returns the user. Return Value string|null