|
static | getUri () |
|
static | getMethod () |
|
static | getVar ($name, $default=null, $hash='default', $type='none', $mask=0) |
|
static | getInt ($name, $default=0, $hash='default') |
|
static | getUInt ($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 | setVar ($name, $value=null, $hash='method', $overwrite=true) |
|
static | get ($hash='default', $mask=0) |
|
static | set ($array, $hash='default', $overwrite=true) |
|
static | checkToken ($method='post') |
|
JRequest Class
This class serves to provide the Joomla Platform with a common interface to access request variables. This includes $_POST, $_GET, and naturally $_REQUEST. Variables can be passed through an input filter to avoid injection or returned raw.
- Depuis
- 1.5
- Obsolète:
- 1.7 Get the JInput object from the application instead
static get |
( |
|
$hash = 'default' , |
|
|
|
$mask = 0 |
|
) |
| |
|
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:
post $_POST get $_GET files $_FILES cookie $_COOKIE env $_ENV server $_SERVER method via current $_SERVER['REQUEST_METHOD'] default $_REQUEST
- Paramètres
-
string | $hash | to get (POST, GET, FILES, METHOD). |
integer | $mask | Filter mask for the variable. |
- Renvoie
- mixed Request hash.
- Depuis
- 1.5
- Obsolète:
- 1.7 Use JInput::get()
- Voir également
- JInput
Références $hash, et $input.
Référencé par FOFInput\__construct().
static getCmd |
( |
|
$name, |
|
|
|
$default = '' , |
|
|
|
$hash = 'default' |
|
) |
| |
|
static |
Cmd (Word and Integer) filter
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.
- Paramètres
-
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) |
- Renvoie
- string Requested variable
- Depuis
- 1.5
- Obsolète:
- 1.7
Références $default, $hash, et $name.
static getInt |
( |
|
$name, |
|
|
|
$default = 0 , |
|
|
|
$hash = 'default' |
|
) |
| |
|
static |
Fetches and returns a given filtered variable. The integer filter will allow only digits and the - sign to be returned. This is currently only a proxy function for getVar().
See getVar() for more in-depth documentation on the parameters.
- Paramètres
-
string | $name | Variable name. |
integer | $default | Default value if the variable does not exist. |
string | $hash | Where the var should come from (POST, GET, FILES, COOKIE, METHOD). |
- Renvoie
- integer Requested variable.
- Depuis
- 1.5
- Obsolète:
- 1.7
Références $default, $hash, et $name.
Référencé par FOFFormFieldRules\getInput25().
static getString |
( |
|
$name, |
|
|
|
$default = '' , |
|
|
|
$hash = 'default' , |
|
|
|
$mask = 0 |
|
) |
| |
|
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.
- Paramètres
-
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) |
integer | $mask | Filter mask for the variable |
- Renvoie
- string Requested variable
- Depuis
- 1.5
- Obsolète:
- 1.7
Références $default, $hash, et $name.
static getVar |
( |
|
$name, |
|
|
|
$default = null , |
|
|
|
$hash = 'default' , |
|
|
|
$type = 'none' , |
|
|
|
$mask = 0 |
|
) |
| |
|
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:
post $_POST get $_GET files $_FILES cookie $_COOKIE env $_ENV server $_SERVER method via current $_SERVER['REQUEST_METHOD'] default $_REQUEST
- Paramètres
-
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). |
string | $type | Return type for the variable, for valid values see JFilterInput::clean(). |
integer | $mask | Filter mask for the variable. |
- Renvoie
- mixed Requested variable.
- Depuis
- 1.5
- Obsolète:
- 1.7 Use JInput::get()
Références $default, $GLOBALS, $hash, $input, $name, $type, elseif, et null.