Provides unified access to the $_GET and $_POST inputs.  
 More...
|  | 
|  | __construct (protected Request $request) | 
|  | Constructor.  More... 
 | 
|  | 
|  | set ($key, $value) | 
|  | Sets an input value that may later be retrieved by get_input.  More... 
 | 
|  | 
|  | get ($key, $default=null, $filter_result=true) | 
|  | Get some input from variables passed submitted through GET or POST.  More... 
 | 
|  | 
|  | all ($filter_result=true) | 
|  | Returns all values parsed from the request.  More... 
 | 
|  | 
Provides unified access to the $_GET and $_POST inputs. 
- Since
- 1.10.0 
Definition at line 11 of file Input.php.
◆ __construct()
      
        
          | Elgg\Http\Input::__construct | ( | protected Request | $request | ) |  | 
      
 
Constructor. 
- Parameters
- 
  
  
Definition at line 18 of file Input.php.
 
 
◆ all()
      
        
          | Elgg\Http\Input::all | ( |  | $filter_result = true | ) |  | 
      
 
Returns all values parsed from the request. 
- Parameters
- 
  
    | bool | $filter_result | Sanitize input values |  
 
- Returns
- array 
Definition at line 74 of file Input.php.
 
 
◆ get()
      
        
          | Elgg\Http\Input::get | ( |  | $key, | 
        
          |  |  |  | $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.
- Parameters
- 
  
    | string | $key | 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 48 of file Input.php.
 
 
◆ set()
      
        
          | Elgg\Http\Input::set | ( |  | $key, | 
        
          |  |  |  | $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 | $key | The name of the variable |  | string | string[] | $value | The value of the variable |  
 
- Returns
- void 
Definition at line 31 of file Input.php.
 
 
The documentation for this class was generated from the following file: