Function __global->get_param_integer
Definitions
sources/global2.php
- This function is the integeric partner of get_param_string, as it returns the value as an integer.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: int
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $name | ID_TEXT | No | No | required parameter | N/A | N/A | The name of the parameter to get |
| $default | ?~mixed | No | No | False | N/A | N/A | The default value to give the parameter if the parameter value is not defined or the empty string (null: allow missing parameter) (false: give error on missing parameter) |
| $not_string_ok | boolean | No | No | False | N/A | N/A | If a string is given, use the default parameter rather than giving an error (only use this if you are suffering from a parameter conflict situation between different parts of the software) |
Returns
- The parameter value (null: not set, and null given as default)
- Type: ?integer
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* This function is the integeric partner of get_param_string, as it returns the value as an integer.
*
* @param ID_TEXT $name The name of the parameter to get
* @param ?~mixed $default The default value to give the parameter if the parameter value is not defined or the empty string (null: allow missing parameter) (false: give error on missing parameter)
* @param boolean $not_string_ok If a string is given, use the default parameter rather than giving an error (only use this if you are suffering from a parameter conflict situation between different parts of the software)
* @return ?integer The parameter value (null: not set, and null given as default)
*/
function get_param_integer(string $name, $default = false, bool $not_string_ok = false) : ?int
* This function is the integeric partner of get_param_string, as it returns the value as an integer.
*
* @param ID_TEXT $name The name of the parameter to get
* @param ?~mixed $default The default value to give the parameter if the parameter value is not defined or the empty string (null: allow missing parameter) (false: give error on missing parameter)
* @param boolean $not_string_ok If a string is given, use the default parameter rather than giving an error (only use this if you are suffering from a parameter conflict situation between different parts of the software)
* @return ?integer The parameter value (null: not set, and null given as default)
*/
function get_param_integer(string $name, $default = false, bool $not_string_ok = false) : ?int
sources/minikernel.php
- This function is the integeric partner of get_param_string, as it returns the value as an integer.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: int
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $name | ID_TEXT | No | No | required parameter | N/A | N/A | The name of the parameter to get |
| $default | ?~mixed | No | No | False | N/A | N/A | The default value to use for the parameter (null: no default) (false: give error on missing parameter) |
Returns
- The parameter value (null: not found and default was null)
- Type: ?integer
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* This function is the integeric partner of get_param_string, as it returns the value as an integer.
*
* @param ID_TEXT $name The name of the parameter to get
* @param ?~mixed $default The default value to use for the parameter (null: no default) (false: give error on missing parameter)
* @return ?integer The parameter value (null: not found and default was null)
*/
function get_param_integer(string $name, $default = false) : ?int
* This function is the integeric partner of get_param_string, as it returns the value as an integer.
*
* @param ID_TEXT $name The name of the parameter to get
* @param ?~mixed $default The default value to use for the parameter (null: no default) (false: give error on missing parameter)
* @return ?integer The parameter value (null: not found and default was null)
*/
function get_param_integer(string $name, $default = false) : ?int
