phpBB

Development Wiki

Umil.config exists

From phpBB Development Wiki

umil::config_exists –– Check if a config setting exists using the Umil Library.

Description

string umil::config_exists ( string $config_name [, boolean $return_result ] )

Parameters

Parameter Required/Default Usage
config_name Required The name of the config setting to check for
return_result default false True to return the value of the config setting if it exists, false to just return true or false if it exists or does not.

Return Values

$return_result = false

True if the config setting exists
False if the config setting does not exist

$return_result = true

The value of the config setting

Examples

Example #1

Check if a config item named 'test_mod' exists

$umil->config_exists('test_mod');

Example #2

Check if a config item named 'test_mod' exists and return the value if it does exist

$umil->config_exists('test_mod'true);

See Also