Function __global->__param
Definitions
sources/global2.php
- Helper function to load up a GET/POST parameter.If the requested POST parameter is an array, it will be returned as a comma-delimited string.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $array | array | No | No | required parameter | N/A | N/A | The array we're extracting parameters from |
| $name | string | No | No | required parameter | N/A | N/A | The name of the parameter |
| $default | ?~mixed | No | No | required parameter | N/A | N/A | The default value to give the parameter if the parameter value is not defined (null: allow missing parameter) (false: give error on missing parameter) |
| $integer | boolean | No | No | False | N/A | N/A | Whether the parameter has to be an integer |
| $posted | ?boolean | No | No | False | N/A | N/A | Whether the parameter is a POST parameter (null: undetermined) |
Returns
- The value of the parameter (null: missing)
- Type: ?string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Helper function to load up a GET/POST parameter.If the requested POST parameter is an array, it will be returned as a comma-delimited string.
*
* @param array $array The array we're extracting parameters from
* @param string $name The name of the parameter
* @param ?~mixed $default The default value to give the parameter if the parameter value is not defined (null: allow missing parameter) (false: give error on missing parameter)
* @param boolean $integer Whether the parameter has to be an integer
* @param ?boolean $posted Whether the parameter is a POST parameter (null: undetermined)
* @return ?string The value of the parameter (null: missing)
*/
function __param(array $array, string $name, $default, bool $integer = false, ?bool $posted = false) : ?string
* Helper function to load up a GET/POST parameter.If the requested POST parameter is an array, it will be returned as a comma-delimited string.
*
* @param array $array The array we're extracting parameters from
* @param string $name The name of the parameter
* @param ?~mixed $default The default value to give the parameter if the parameter value is not defined (null: allow missing parameter) (false: give error on missing parameter)
* @param boolean $integer Whether the parameter has to be an integer
* @param ?boolean $posted Whether the parameter is a POST parameter (null: undetermined)
* @return ?string The value of the parameter (null: missing)
*/
function __param(array $array, string $name, $default, bool $integer = false, ?bool $posted = false) : ?string
sources/minikernel.php
- Helper function to load up a GET/POST parameter.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $array | array | No | No | required parameter | N/A | N/A | The array we're extracting parameters from |
| $name | ID_TEXT | No | No | required parameter | N/A | N/A | The name of the parameter |
| $default | ?~mixed | No | No | required parameter | N/A | N/A | The default value to use for the parameter (null: no default) (false: give error on missing parameter) |
| $must_integer | boolean | No | No | False | N/A | N/A | Whether the parameter has to be an integer |
| $is_post | boolean | No | No | False | N/A | N/A | Whether the parameter is a POST parameter |
Returns
- The value of the parameter (null: not there, and default was null)
- Type: ?string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Helper function to load up a GET/POST parameter.
*
* @param array $array The array we're extracting parameters from
* @param ID_TEXT $name The name of the parameter
* @param ?~mixed $default The default value to use for the parameter (null: no default) (false: give error on missing parameter)
* @param boolean $must_integer Whether the parameter has to be an integer
* @param boolean $is_post Whether the parameter is a POST parameter
* @return ?string The value of the parameter (null: not there, and default was null)
*/
function __param(array $array, string $name, $default, bool $must_integer = false, bool $is_post = false) : ?string
* Helper function to load up a GET/POST parameter.
*
* @param array $array The array we're extracting parameters from
* @param ID_TEXT $name The name of the parameter
* @param ?~mixed $default The default value to use for the parameter (null: no default) (false: give error on missing parameter)
* @param boolean $must_integer Whether the parameter has to be an integer
* @param boolean $is_post Whether the parameter is a POST parameter
* @return ?string The value of the parameter (null: not there, and default was null)
*/
function __param(array $array, string $name, $default, bool $must_integer = false, bool $is_post = false) : ?string

