Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

param::optional($name, $default, $type, $from = self::FETCH_REQUEST)

ParameterTypeExplanation
$namestringThe name of the parameter to be retrieved
$defaultmixedThe value that should be returned if the parameter is not set, or not of the correct type.
$typeintThe type that $value should be cleaned as. It should be passed as one of the param class constants, i.e. param::FLOAT
$fromstringDefault: 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)

ParameterTypeExplanation
$namestringThe name of the parameter to be retrieved
$methodstring|arrayShould be one of: param::FETCH_GET, param::FETCH_POST, param::FETCH_REQUEST, or an array
$mandatorybooleanIf true then exit if the variable does not exist
$headersbooleanIf true then output HTML header code on a failure
$return_varbooleanIf true return the value of the tested variable back
$typeintDefault: param::RAW. The type that $value should be cleaned as. It should be passed as one of the param class constants
, i
.
e. param::FLOAT
(Since Rogo 6.3.0)

To check for variables include:

...