Http Request utilities.
More...
|
static | setValuesToObject ($object, $values=null) |
| Affects member to member the values of the associative array $values to the members of the object $object Used for example to retrieve the variables posted and assign them to the members of an object. More...
|
|
static | getPost ($function="htmlentities") |
| Call a cleaning function on the post. More...
|
|
static | getInput () |
| Returns the query data, for PUT, DELETE PATCH methods. More...
|
|
static | getDatas () |
| Returns the query data, regardless of the method. More...
|
|
static | getContentType () |
| Returns the request content-type header. More...
|
|
static | isAjax () |
| Returns true if the request is an Ajax request. More...
|
|
static | isPost () |
| Returns true if the request is sent by the POST method. More...
|
|
static | isCrossSite () |
| Returns true if the request is cross site. More...
|
|
static | isJSON () |
| Returns true if request contentType is set to json. More...
|
|
static | get ($key, $default=NULL) |
| Returns the value of the $key variable passed by the get method or $default if the $key variable does not exist. More...
|
|
static | post ($key, $default=NULL) |
| Returns the value of the $key variable passed by the post method or $default if the $key variable does not exist. More...
|
|
static | getUrl ($url) |
|
static | getUrlParts () |
|
static | getMethod () |
| Returns the http method. More...
|
|
static | cleanUrl ($url) |
|
Http Request utilities.
- Author
- jc
- Version
- 1.0.0.2
Definition at line 13 of file URequest.php.
◆ cleanUrl()
◆ get()
static get |
( |
|
$key, |
|
|
|
$default = NULL |
|
) |
| |
|
static |
Returns the value of the $key variable passed by the get method or $default if the $key variable does not exist.
- Parameters
-
string | $key | |
string | $default | return value by default |
- Returns
- string
Definition at line 118 of file URequest.php.
◆ getContentType()
static getContentType |
( |
| ) |
|
|
static |
Returns the request content-type header.
- Returns
- string
Definition at line 71 of file URequest.php.
◆ getDatas()
Returns the query data, regardless of the method.
- Returns
- array
Definition at line 55 of file URequest.php.
◆ getInput()
Returns the query data, for PUT, DELETE PATCH methods.
Definition at line 45 of file URequest.php.
◆ getMethod()
Returns the http method.
- Returns
- string
Definition at line 149 of file URequest.php.
◆ getPost()
static getPost |
( |
|
$function = "htmlentities" | ) |
|
|
static |
Call a cleaning function on the post.
- Parameters
-
string | $function | the cleaning function, default htmlentities |
- Returns
- array
Definition at line 38 of file URequest.php.
◆ getUrl()
◆ getUrlParts()
◆ isAjax()
Returns true if the request is an Ajax request.
- Returns
- boolean
Definition at line 83 of file URequest.php.
◆ isCrossSite()
Returns true if the request is cross site.
- Returns
- boolean
Definition at line 99 of file URequest.php.
◆ isJSON()
Returns true if request contentType is set to json.
- Returns
- boolean
Definition at line 107 of file URequest.php.
◆ isPost()
Returns true if the request is sent by the POST method.
- Returns
- boolean
Definition at line 91 of file URequest.php.
◆ post()
static post |
( |
|
$key, |
|
|
|
$default = NULL |
|
) |
| |
|
static |
Returns the value of the $key variable passed by the post method or $default if the $key variable does not exist.
- Parameters
-
string | $key | |
string | $default | return value by default |
- Returns
- string
Definition at line 128 of file URequest.php.
◆ setValuesToObject()
static setValuesToObject |
( |
|
$object, |
|
|
|
$values = null |
|
) |
| |
|
static |
Affects member to member the values of the associative array $values to the members of the object $object Used for example to retrieve the variables posted and assign them to the members of an object.
- Parameters
-
object | $object | |
| associative | array $values |
Definition at line 21 of file URequest.php.
The documentation for this class was generated from the following file: