Go to the source code of this file.
Initialize the input library.
- Returns
- void private
Definition at line 401 of file input.php.
Returns the current page's complete URL.
It uses the configured site URL for the hostname rather than depending on what the server uses to populate $_SERVER.
- Returns
- string The current page URL.
- Examples:
- /root/Elgg/engine/lib/views.php.
Definition at line 65 of file input.php.
elgg_clear_sticky_form |
( |
|
$form_name | ) |
|
Remove form submission data from the session.
Call this if validation is successful in the action handler or when they sticky values have been used to repopulate the form after a validation error.
- Parameters
-
string | $form_name | Form namespace |
- Returns
- void
- Since
- 1.8.0
Definition at line 119 of file input.php.
elgg_clear_sticky_value |
( |
|
$form_name, |
|
|
|
$variable |
|
) |
| |
Remove one value of form submission data from the session.
- Parameters
-
string | $form_name | The name of the form |
string | $variable | The name of the variable to clear |
- Returns
- void
- Since
- 1.8.0
Definition at line 174 of file input.php.
elgg_get_sticky_value |
( |
|
$form_name, |
|
|
|
$variable = '' , |
|
|
|
$default = null , |
|
|
|
$filter_result = true |
|
) |
| |
Get a specific value from cached form submission data.
- Parameters
-
string | $form_name | The name of the form |
string | $variable | The name of the variable |
mixed | $default | Default value if the variable does not exist in sticky cache |
boolean | $filter_result | Filter for bad input if true |
- Returns
- mixed
- Since
- 1.8.0
Definition at line 148 of file input.php.
elgg_get_sticky_values |
( |
|
$form_name, |
|
|
|
$filter_result = true |
|
) |
| |
Get all submission data cached for a form.
- Parameters
-
string | $form_name | The name of the form |
bool | $filter_result | Filter for bad input if true |
- Returns
- array
- Since
- 1.8.0
Definition at line 161 of file input.php.
elgg_is_sticky_form |
( |
|
$form_name | ) |
|
Does form submission data exist for this form?
- Parameters
-
string | $form_name | Form namespace |
- Returns
- boolean
- Since
- 1.8.0
Definition at line 131 of file input.php.
elgg_make_sticky_form |
( |
|
$form_name | ) |
|
Save form submission data (all GET and POST vars) into a session cache.
Call this from an action when you want all your submitted variables available if the submission fails validation and is sent back to the form
- Parameters
-
string | $form_name | Name of the sticky form |
- Returns
- void
- Since
- 1.8.0
Definition at line 103 of file input.php.
Filter tags from a given string based on registered hooks.
- Parameters
-
mixed | $var | Anything that does not include an object (strings, ints, arrays) This includes multi-dimensional arrays. |
- Returns
- mixed The filtered result - everything will be strings
Definition at line 53 of file input.php.
get_input |
( |
|
$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
- Examples:
- /root/Elgg/engine/lib/views.php.
Definition at line 27 of file input.php.
input_livesearch_page_handler |
( |
|
$page | ) |
|
Page handler for autocomplete endpoint.
/livesearch?q=<query>
Other options include: match_on string all or array(groups|users|friends) match_owner int 0/1 limit int default is 10 name string default "members"
- Parameters
-
- Returns
- string JSON string is returned and then exit private
Definition at line 195 of file input.php.
is_email_address |
( |
|
$address | ) |
|
Validates an email address.
- Parameters
-
string | $address | Email address. |
- Returns
- bool
Definition at line 88 of file input.php.
set_input |
( |
|
$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 41 of file input.php.