Public Member Functions | |
| __construct () | |
| Constructor throws an error. | |
Static Public Member Functions | |
| static | get ($name) |
| Return a variable from the configuration data. | |
| static | getdefault ($name, $default) |
| Return a variable from the configuration data, returning a default value if the value is not available. | |
| static | set ($name, $value) |
| Store a variable in the configuration data. | |
| static | is_set ($name) |
| Check if a variable is defined in the configuration data. | |
| static | delete ($name) |
| Delete a variable from the configuration data. | |
| static | seed ($arr) |
| Set multiple values at once. | |
| static | to_array () |
| Return all configuration data as an array. | |
| static | load_ini_file ($filename) |
| Load configuration data from a ini file. | |
Definition at line 18 of file config.lib.php.
| AnewtConfig::__construct | ( | ) |
Constructor throws an error.
Only static usage of this class is allowed.
Definition at line 23 of file config.lib.php.
| static AnewtConfig::get | ( | $ | name | ) | [static] |
Return a variable from the configuration data.
| $name | The variable name. |
Definition at line 38 of file config.lib.php.
| static AnewtConfig::getdefault | ( | $ | name, | |
| $ | default | |||
| ) | [static] |
Return a variable from the configuration data, returning a default value if the value is not available.
| $name | The variable name. | |
| $default | The default value returned if the value was not found. |
Definition at line 61 of file config.lib.php.
| static AnewtConfig::set | ( | $ | name, | |
| $ | value | |||
| ) | [static] |
Store a variable in the configuration data.
| $name | The variable name. | |
| $value | The value of the variable. |
Definition at line 76 of file config.lib.php.
| static AnewtConfig::is_set | ( | $ | name | ) | [static] |
Check if a variable is defined in the configuration data.
| $name | The variable name to check for. |
Definition at line 93 of file config.lib.php.
| static AnewtConfig::delete | ( | $ | name | ) | [static] |
Delete a variable from the configuration data.
| $name | The name of the variable to delete. |
Definition at line 106 of file config.lib.php.
| static AnewtConfig::seed | ( | $ | arr | ) | [static] |
Set multiple values at once.
| $arr | An associative array with name/value pairs. |
Definition at line 121 of file config.lib.php.
| static AnewtConfig::to_array | ( | ) | [static] |
Return all configuration data as an array.
Definition at line 138 of file config.lib.php.
| static AnewtConfig::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').
| $filename | The filename of the ini file. |
Definition at line 156 of file config.lib.php.
1.5.9