The AnewtConfig class provides static methods for configuration management.
The AnewtConfig class provides static methods for configuration management.
static get($name) [static] ¶Return a variable from the configuration data.
$nameThe variable name.
The value of the variable.
static getdefault($name, $default) [static] ¶Return a variable from the configuration data, returning a default value if the value is not available.
$nameThe variable name.
$defaultThe default value returned if the value was not found.
The value of the variable.
static set($name, $value) [static] ¶Store a variable in the configuration data.
$nameThe variable name.
$valueThe value of the variable.
static is_set($name) [static] ¶Check if a variable is defined in the configuration data.
$nameThe variable name to check for.
True if the variable is available, false otherwise.
static delete($name) [static] ¶Delete a variable from the configuration data.
$nameThe name of the variable to delete.
static seed($arr) [static] ¶Set multiple values at once.
static load_ini_file($filename) [static] ¶Load configuration data from a ini file.
If the ini file contains sections, the name of the configuration settings will be the section name and the setting name with a hyphen in between, e.g. the hostname=... setting inside a [database] setting can be retrieved using .AnewtConfig::get('database-hostname')
$filenameThe filename of the ini file.