Elgg  Version 2.3
Public Member Functions | List of all members
Elgg\Http\Input Class Reference

Public Member Functions

 __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...
 

Detailed Description

Definition at line 14 of file Input.php.

Constructor & Destructor Documentation

Elgg\Http\Input::__construct ( )

Constructor.

Definition at line 25 of file Input.php.

Member Function Documentation

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$variableThe variable name we want.
mixed$defaultA default value for the variable if it is not found.
bool$filter_resultIf 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$variableThe 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: