Function Forum_driver_smf2->get_setting
Definitions
sources/forum/smf2.php
- Get an SMF setting.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
---|---|---|---|---|---|---|---|
$setting | ID_TEXT | No | No | required parameter | N/A | N/A | The name of the setting |
$allow_missing | boolean | No | No | False | N/A | N/A | Whether to allow a missing setting without throwing an error |
Returns
- The setting value (null: Setting does not exist and $allow_setting is true)
- Type: ?string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get an SMF setting.
*
* @param ID_TEXT $setting The name of the setting
* @param boolean $allow_missing Whether to allow a missing setting without throwing an error
* @return ?string The setting value (null: Setting does not exist and $allow_setting is true)
*/
public function get_setting(string $setting, bool $allow_missing = false) : ?string
* Get an SMF setting.
*
* @param ID_TEXT $setting The name of the setting
* @param boolean $allow_missing Whether to allow a missing setting without throwing an error
* @return ?string The setting value (null: Setting does not exist and $allow_setting is true)
*/
public function get_setting(string $setting, bool $allow_missing = false) : ?string