IRequest
interface IRequest
IHttpRequest provides access scheme for request sent via HTTP.
Constants
GET |
HTTP request method |
POST |
HTTP request method |
HEAD |
HTTP request method |
PUT |
HTTP request method |
DELETE |
HTTP request method |
Methods
Returns variable provided to the script via URL query ($_GET).
Returns variable provided to the script via POST method ($_POST).
Returns uploaded file.
Returns uploaded files.
Returns variable provided to the script via HTTP cookies.
Returns variables provided to the script via HTTP cookies.
Returns HTTP request method (GET, POST, HEAD, PUT, ...). The method is case-sensitive.
Checks HTTP request method.
Return the value of the HTTP header. Pass the header name as the plain, HTTP-specified header name (e.g. 'Accept-Encoding').
Returns all HTTP headers.
Is the request is sent via secure channel (https).
Is AJAX request?
Returns the IP address of the remote client.
Returns the host of the remote client.
Returns raw content of HTTP request body.
Details
at line 30
UrlScript
getUrl()
Returns URL object.
at line 41
mixed
getQuery($key = NULL, $default = NULL)
Returns variable provided to the script via URL query ($_GET).
If no key is passed, returns the entire array.
at line 50
mixed
getPost($key = NULL, $default = NULL)
Returns variable provided to the script via POST method ($_POST).
If no key is passed, returns the entire array.
at line 57
FileUpload|null
getFile($key)
Returns uploaded file.
at line 63
array
getFiles()
Returns uploaded files.
at line 71
mixed
getCookie($key, $default = NULL)
Returns variable provided to the script via HTTP cookies.
at line 77
array
getCookies()
Returns variables provided to the script via HTTP cookies.
at line 85
string
getMethod()
Returns HTTP request method (GET, POST, HEAD, PUT, ...). The method is case-sensitive.
at line 92
bool
isMethod($method)
Checks HTTP request method.
at line 101
mixed
getHeader($header, $default = NULL)
Return the value of the HTTP header. Pass the header name as the plain, HTTP-specified header name (e.g. 'Accept-Encoding').
at line 107
array
getHeaders()
Returns all HTTP headers.
at line 113
bool
isSecured()
Is the request is sent via secure channel (https).
at line 119
bool
isAjax()
Is AJAX request?
at line 125
string|null
getRemoteAddress()
Returns the IP address of the remote client.
at line 131
string|null
getRemoteHost()
Returns the host of the remote client.
at line 137
string|null
getRawBody()
Returns raw content of HTTP request body.