Request container.
More...
Request container.
Definition at line 12 of file Request.php.
Elgg\Request::__construct |
( |
protected PublicContainer |
$dic, |
|
|
protected HttpRequest |
$http_request |
|
) |
| |
Constructor.
- Parameters
-
PublicContainer | $dic | DI container |
HttpRequest | $http_request | Request |
Definition at line 25 of file Request.php.
Get the DI container.
- Returns
- PublicContainer
Definition at line 125 of file Request.php.
Elgg\Request::getEntityParam |
( |
string |
$key = 'guid' | ) |
|
Gets the "entity" key from the params if it holds an Elgg entity.
- Parameters
-
string | $key | Input key to pull entity GUID from |
- Returns
- |null
Definition at line 91 of file Request.php.
Elgg\Request::getHttpRequest |
( |
| ) |
|
Get the HttpRequest for this request.
- Returns
Definition at line 166 of file Request.php.
Elgg\Request::getMethod |
( |
| ) |
|
Get HTTP method of the request.
- Returns
- string
Definition at line 157 of file Request.php.
Elgg\Request::getParam |
( |
|
$key, |
|
|
|
$default = null , |
|
|
|
$filter = true |
|
) |
| |
Get an element of the params array.
If the params array is not an array, the default will always be returned.
- Parameters
-
string | $key | The key of the value in the params array |
mixed | $default | The value to return if missing |
bool | $filter | Sanitize input value |
- Returns
- mixed
Definition at line 67 of file Request.php.
Elgg\Request::getParams |
( |
|
$filter = true | ) |
|
Get the parameters from the request query and route matches.
- Parameters
-
bool | $filter | Sanitize input values |
- Returns
- array
Definition at line 53 of file Request.php.
Elgg\Request::getPath |
( |
| ) |
|
Get relative path of the request.
- Returns
- string
Definition at line 141 of file Request.php.
Elgg\Request::getRoute |
( |
| ) |
|
Get the name of the route.
- Returns
- string
Definition at line 42 of file Request.php.
Get URL of the request.
- Returns
- string
Definition at line 133 of file Request.php.
Elgg\Request::getUserParam |
( |
string |
$key = 'user_guid' | ) |
|
Gets the "user" key from the params if it holds an Elgg user.
- Parameters
-
string | $key | Input key to pull user GUID from, or "username" for a username. |
- Returns
- |null
Definition at line 107 of file Request.php.
Is the route access with XmlHttpRequest.
- Returns
- bool
Definition at line 149 of file Request.php.
Elgg\Request::setParam |
( |
|
$key, |
|
|
|
$value = null |
|
) |
| |
Set request parameter.
- See also
- set_input()
- Parameters
-
string | $key | Parameter name |
mixed | $value | Value |
- Returns
- void
Definition at line 80 of file Request.php.
Elgg\Request::validation |
( |
| ) |
|
Access validation results bag.
- Returns
- ValidationResults
Definition at line 33 of file Request.php.
Elgg\Request::$validation |
|
protected |
The documentation for this class was generated from the following file: