Interface IHttpRequest
IHttpRequest provides access scheme for request sent via HTTP.
Direct Known Implementers
HttpRequest
public
UriScript
|
#
getUri(
)
Returns URL object. Returns URL object. |
public
mixed
|
#
getQuery(
string
$key = NULL,
mixed
$default = NULL
)
Returns variable provided to the script via URL query ($_GET). Returns variable provided to the script via URL query ($_GET). If no key is passed, returns the entire array. Parameters$key string key$default mixed default value |
public
mixed
|
#
getPost(
string
$key = NULL,
mixed
$default = NULL
)
Returns variable provided to the script via POST method ($_POST). Returns variable provided to the script via POST method ($_POST). If no key is passed, returns the entire array. Parameters$key string key$default mixed default value |
public
HttpUploadedFile
|
#
getFile(
string
$key
)
Returns uploaded file. Returns uploaded file. Parameters$key string key (or more keys) |
public
array
|
#
getFiles(
)
Returns uploaded files. Returns uploaded files. |
public
mixed
|
#
getCookie(
string
$key,
mixed
$default = NULL
)
Returns variable provided to the script via HTTP cookies. Returns variable provided to the script via HTTP cookies. Parameters$key string key$default mixed default value |
public
array
|
#
getCookies(
)
Returns variables provided to the script via HTTP cookies. Returns variables provided to the script via HTTP cookies. |
public
string
|
#
getMethod(
)
Returns HTTP request method (GET, POST, HEAD, PUT, …). The method is case-sensitive. Returns HTTP request method (GET, POST, HEAD, PUT, …). The method is case-sensitive. |
public
bool
|
#
isMethod(
string
$method
)
Checks HTTP request method. Checks HTTP request method. Parameters$method string |
public
mixed
|
#
getHeader(
string
$header,
mixed
$default = NULL
)
Return the value of the HTTP header. Pass the header name as the Return the value of the HTTP header. Pass the header name as the plain, HTTP-specified header name (e.g. ‚Accept-Encoding‘). Parameters$header string$default mixed |
public
array
|
#
getHeaders(
)
Returns all HTTP headers. Returns all HTTP headers. |
public
bool
|
#
isSecured(
)
Is the request is sent via secure channel (https). Is the request is sent via secure channel (https). |
public
bool
|
#
isAjax(
)
Is AJAX request? Is AJAX request? |
public
string
|
#
getRemoteAddress(
)
Returns the IP address of the remote client. Returns the IP address of the remote client. |
public
string
|
#
getRemoteHost(
)
Returns the host of the remote client. Returns the host of the remote client. |