XOOPS
2.6.0
|
Static Public Member Functions | |
static | get ($hash= 'default', $mask=0) |
static | getArray ($name, $default=array(), $hash= 'default') |
static | getBool ($name, $default=false, $hash= 'default') |
static | getCmd ($name, $default= '', $hash= 'default') |
static | getEmail ($name, $default= '', $hash= 'default') |
static | getFloat ($name, $default=0.0, $hash= 'default') |
static | getInt ($name, $default=0, $hash= 'default') |
static | getIP ($name, $default= '', $hash= 'default') |
static | getMethod () |
static | getPath ($name, $default= '', $hash= 'default') |
static | getString ($name, $default= '', $hash= 'default', $mask=0) |
static | getText ($name, $default= '', $hash= 'default') |
static | getUrl ($name, $default= '', $hash= 'default') |
static | getVar ($name, $default=null, $hash= 'default', $type= 'none', $mask=0) |
static | getWord ($name, $default= '', $hash= 'default') |
static | set ($array, $hash= 'default', $overwrite=true) |
static | setVar ($name, $value=null, $hash= 'method', $overwrite=true) |
Public Attributes | |
const | ALLOWHTML = 4 |
const | ALLOWRAW = 2 |
const | NOTRIM = 1 |
Static Private Member Functions | |
static | cleanVar ($var, $mask=0, $type=null) |
static | cleanVars ($var, $mask=0, $type=null) |
static | stripSlashesRecursive ($value) |
Definition at line 34 of file Request.php.
|
staticprivate |
Clean up an input variable.
mixed | $var | The input variable. |
int | $mask | Filter bit mask.
|
string | $type | The variable type. See FilterInput::clean(). |
Definition at line 492 of file Request.php.
References $type, $var, and Xoops\Core\FilterInput\getInstance().
|
staticprivate |
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(). |
Definition at line 539 of file Request.php.
|
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 |
Definition at line 419 of file Request.php.
|
static |
Fetches and returns an array
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) |
Definition at line 259 of file Request.php.
References $name.
|
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) |
Definition at line 189 of file Request.php.
References $name.
|
static |
Fetches and returns a given filtered variable. The cmd filter only allows the characters [A-Za-z0-9.-_]. 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) |
Definition at line 225 of file Request.php.
References $name.
|
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) |
Definition at line 315 of file Request.php.
References $name.
|
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) |
Definition at line 171 of file Request.php.
References $name.
|
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) |
Definition at line 153 of file Request.php.
References $name.
|
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) |
Definition at line 330 of file Request.php.
References $name.
|
static |
Gets the request method
Definition at line 49 of file Request.php.
References $_SERVER.
|
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) |
Definition at line 301 of file Request.php.
References $name.
|
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 |
Definition at line 244 of file Request.php.
References $name.
Referenced by Xoops\Core\Session\RememberMe\readUserCookie().
|
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) |
Definition at line 273 of file Request.php.
References $name.
|
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) |
Definition at line 287 of file Request.php.
References $name.
|
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, ALNUM, CMD, BASE64, STRING, ARRAY, PATH, NONE) For more information see Xoops::clean(). |
int | $mask | Filter mask for the variable |
Definition at line 85 of file Request.php.
|
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) |
Definition at line 207 of file Request.php.
References $name.
|
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 ingored |
Definition at line 470 of file Request.php.
|
static |
Set a variable in one of the request variables
string | $name | Name |
string | $value | Value |
string | $hash | Hash |
boolean | $overwrite | Boolean |
Definition at line 346 of file Request.php.
|
staticprivate |
Strips slashes recursively on an array
array | $value | Array of (nested arrays of) strings |
Definition at line 560 of file Request.php.
const Xoops\Core\Request::ALLOWHTML = 4 |
Definition at line 42 of file Request.php.
const Xoops\Core\Request::ALLOWRAW = 2 |
Definition at line 41 of file Request.php.
const Xoops\Core\Request::NOTRIM = 1 |
Available masks for cleaning variables
Definition at line 40 of file Request.php.