...
param::optional($name, $default, $type, $from = self::FETCH_REQUEST)
Parameter | Type | Explanation |
---|---|---|
$name | string | The name of the parameter to be retrieved |
$default | mixed | The value that should be returned if the parameter is not set, or not of the correct type. |
$type | int | The type that $value should be cleaned as. It should be passed as one of the param class constants, i.e. param::FLOAT |
$from | string | Default: param::FETCH_REQUEST. Should be one of: param::FETCH_GET, param::FETCH_POST or param::FETCH_REQUEST |
...
check_var($name, $method, $mandatory, $headers, $return_var, $type = param::RAW)
Parameter | Type | Explanation |
---|---|---|
$name | string | The name of the parameter to be retrieved |
$method | string|array | Should be one of: param::FETCH_GET, param::FETCH_POST, param::FETCH_REQUEST, or an array |
$mandatory | boolean | If true then exit if the variable does not exist |
$headers | boolean | If true then output HTML header code on a failure |
$return_var | boolean | If true return the value of the tested variable back |
$type | int | Default: param::RAW. The type that $value should be cleaned as. It should be passed as one of the param class constants |
. |
(Since Rogo 6.3.0) |
To check for variables include:
...