![]() |
API - XOOPS 2.5.11 Beta 2
By monxoops.fr
|

Static Public Member Functions | |
| static | getMethod () |
| static | getVar ($name, $default=null, $hash='default', $type='none', $mask=0) |
| static | getInt ($name, $default=0, $hash='default') |
| static | getFloat ($name, $default=0.0, $hash='default') |
| static | getBool ($name, $default=false, $hash='default') |
| static | getWord ($name, $default='', $hash='default') |
| static | getCmd ($name, $default='', $hash='default') |
| static | getString ($name, $default='', $hash='default', $mask=0) |
| static | getArray ($name, $default=array(), $hash='default') |
| static | getText ($name, $default='', $hash='default') |
| static | getUrl ($name, $default='', $hash='default') |
| static | getPath ($name, $default='', $hash='default') |
| static | getEmail ($name, $default='', $hash='default') |
| static | getIP ($name, $default='', $hash='default') |
| static | getHeader ($headerName, $default='') |
| static | hasVar ($name, $hash='default') |
| static | setVar ($name, $value=null, $hash='method', $overwrite=true) |
| static | get ($hash='default', $mask=0) |
| static | set ($array, $hash='method', $overwrite=true) |
Data Fields | |
| const | MASK_NO_TRIM = 1 |
| const | MASK_ALLOW_RAW = 2 |
| const | MASK_ALLOW_HTML = 4 |
Static Protected Member Functions | |
| static | cleanVar ($var, $mask=0, $type=null) |
| static | cleanVars ($var, $mask=0, $type=null) |
| static | stripSlashesRecursive ($value) |
|
staticprotected |
Clean up an input variable.
| mixed | $var | The input variable. |
| int | $mask | Filter bit mask.
|
| string | $type | The variable type. See FilterInput::clean(). |
|
staticprotected |
Clean up an array of variables.
| mixed | $var | The input variable. |
| int | $mask | Filter bit mask. See Request::cleanVar() |
| string | $type | The variable type. See FilterInput::clean(). |
|
static |
Fetches and returns a request array.
The default behaviour is fetching variables depending on the current request method: GET and HEAD will result in returning $_GET, POST and PUT will result in returning $_POST.
You can force the source by setting the $hash parameter:
| string | $hash | to get (POST, GET, FILES, METHOD) |
| int | $mask | Filter mask for the variable |
|
static |
Fetches and returns an array
| string | $name | Variable name |
| mixed | $default | Default value if the variable does not exist |
| string | $hash | Where the var should come from (POST, GET, FILES, COOKIE, METHOD) |
|
static |
Fetches and returns a given filtered variable. The bool filter will only return true/false bool values. This is currently only a proxy function for getVar().
See getVar() for more in-depth documentation on the parameters.
| string | $name | Variable name |
| bool | $default | Default value if the variable does not exist |
| string | $hash | Where the var should come from (POST, GET, FILES, COOKIE, METHOD) |
|
static |
Fetches and returns a given filtered variable. The cmd filter only allows the characters [A-Za-z0-9.-_] and returns in lower case. This is currently a proxy function for getVar().
See getVar() for more in-depth documentation on the parameters.
| string | $name | Variable name |
| string | $default | Default value if the variable does not exist |
| string | $hash | Where the var should come from (POST, GET, FILES, COOKIE, METHOD) |
|
static |
Fetches and returns an email address
| string | $name | Variable name |
| string | $default | Default value if the variable does not exist |
| string | $hash | Where the var should come from (POST, GET, FILES, COOKIE, METHOD) |
|
static |
Fetches and returns a given filtered variable. The float filter only allows digits and periods. This is currently only a proxy function for getVar().
See getVar() for more in-depth documentation on the parameters.
| string | $name | Variable name |
| float | $default | Default value if the variable does not exist |
| string | $hash | Where the var should come from (POST, GET, FILES, COOKIE, METHOD) |
|
static |
get request header
| string | $headerName | name of header to retrieve, case insensitive |
| string | null | $default | default to return if named header is not found |

|
static |
Fetches and returns a given filtered variable. The integer filter will allow only digits to be returned. This is currently only a proxy function for getVar().
See getVar() for more in-depth documentation on the parameters.
| string | $name | Variable name |
| int | $default | Default value if the variable does not exist |
| string | $hash | Where the var should come from (POST, GET, FILES, COOKIE, METHOD) |
|
static |
Fetches and returns an IP address
| string | $name | Variable name |
| string | $default | Default value if the variable does not exist |
| string | $hash | Where the var should come from (POST, GET, FILES, COOKIE, METHOD) |
|
static |
Gets the request method
|
static |
Fetches and returns a file (or web) path
| string | $name | Variable name |
| string | $default | Default value if the variable does not exist |
| string | $hash | Where the var should come from (POST, GET, FILES, COOKIE, METHOD) |
|
static |
Fetches and returns a given filtered variable. The string filter deletes 'bad' HTML code, if not overridden by the mask. This is currently only a proxy function for getVar().
See getVar() for more in-depth documentation on the parameters.
| string | $name | Variable name |
| string | $default | Default value if the variable does not exist |
| string | $hash | Where the var should come from (POST, GET, FILES, COOKIE, METHOD) |
| int | $mask | Filter mask for the variable |

|
static |
Fetches and returns raw text
| string | $name | Variable name |
| string | $default | Default value if the variable does not exist |
| string | $hash | Where the var should come from (POST, GET, FILES, COOKIE, METHOD) |
|
static |
Fetches and returns a web url
| string | $name | Variable name |
| string | $default | Default value if the variable does not exist |
| string | $hash | Where the var should come from (POST, GET, FILES, COOKIE, METHOD) |
|
static |
Fetches and returns a given variable.
The default behaviour is fetching variables depending on the current request method: GET and HEAD will result in returning an entry from $_GET, POST and PUT will result in returning an entry from $_POST.
You can force the source by setting the $hash parameter:
| string | $name | Variable name |
| mixed | $default | Default value if the variable does not exist |
| string | $hash | Source of variable value (POST, GET, FILES, COOKIE, METHOD) |
| string | $type | Return type for the variable (INT, FLOAT, BOOLEAN, WORD, ALPHANUM, CMD, BASE64, STRING, ARRAY, PATH, NONE) For more information see FilterInput::clean(). |
| int | $mask | Filter mask for the variable |
|
static |
Fetches and returns a given filtered variable. The word filter only allows the characters [A-Za-z_]. This is currently only a proxy function for getVar().
See getVar() for more in-depth documentation on the parameters.
| string | $name | Variable name |
| string | $default | Default value if the variable does not exist |
| string | $hash | Where the var should come from (POST, GET, FILES, COOKIE, METHOD) |
|
static |
See if a variable exists in one of the request hashes
| string | $name | variable to look for |
| string | $hash | hash to check |
|
static |
Sets a request variable
| array | $array | An associative array of key-value pairs |
| string | $hash | The request variable to set (POST, GET, FILES, METHOD) |
| boolean | $overwrite | If true and an existing key is found, the value is overwritten, otherwise it is ignored |
|
static |
Set a variable in one of the request variables
| string | $name | Name |
| string | $value | Value |
| string | $hash | Hash |
| boolean | $overwrite | Boolean |
|
staticprotected |
Strips slashes recursively on an array
| string | array | $value | string of Array of (nested arrays of) strings |
| const MASK_ALLOW_HTML = 4 |
| const MASK_ALLOW_RAW = 2 |
| const MASK_NO_TRIM = 1 |
Available masks for cleaning variables