|
| __construct () |
| Constructor. More...
|
|
| set ($variable, $value) |
| Sets an input value that may later be retrieved by get_input. More...
|
|
| get ($variable, $default=null, $filter_result=true) |
| Get some input from variables passed submitted through GET or POST. More...
|
|
Definition at line 14 of file Input.php.
Elgg\Http\Input::__construct |
( |
| ) |
|
Elgg\Http\Input::get |
( |
|
$variable, |
|
|
|
$default = null , |
|
|
|
$filter_result = true |
|
) |
| |
Get some input from variables passed submitted through GET or POST.
If using any data obtained from get_input() in a web page, please be aware that it is a possible vector for a reflected XSS attack. If you are expecting an integer, cast it to an int. If it is a string, escape quotes.
Note: this function does not handle nested arrays (ex: form input of param[m][n]) because of the filtering done in htmlawed from the filter_tags call.
- Parameters
-
string | $variable | The variable name we want. |
mixed | $default | A default value for the variable if it is not found. |
bool | $filter_result | If true, then the result is filtered for bad tags. |
- Returns
- mixed
Definition at line 72 of file Input.php.
Elgg\Http\Input::set |
( |
|
$variable, |
|
|
|
$value |
|
) |
| |
Sets an input value that may later be retrieved by get_input.
Note: this function does not handle nested arrays (ex: form input of param[m][n])
- Parameters
-
string | $variable | The name of the variable |
| string|string[] | $value The value of the variable |
- Returns
- void
Definition at line 40 of file Input.php.
The documentation for this class was generated from the following file: