The default value is returned if the value is not defined in the
$_REQUEST array, or if the value does not match the required type.
The type 'checkbox' is special - you cannot specify a default
value for this. The return value will be TRUE or FALSE, but
you can change this by specifying 'numeric' as the 3rd parameter
in which case it will return '1' or '0'.
Use Input::IsValid() to check if any errors were generated.
public static Get ( string $p_varName, string $p_type = 'string', mixed $p_defaultValue = null, boolean $p_errorsOk = false ) : mixed | ||
$p_varName | string | The index into the $_REQUEST array. |
$p_type | string | The type of data expected; can be: "int" "string" "array" "checkbox" "boolean" Default is 'string'. |
$p_defaultValue | mixed | The default value to return if the value is not defined in the $_REQUEST array, or if the value does not match the required type. |
$p_errorsOk | boolean | Set to true to ignore any errors for this variable (i.e. Input::IsValid() will still return true even if there are errors for this varaible). |
Результат | mixed |