-
Notifications
You must be signed in to change notification settings - Fork 0
Famework_Config
LaCodon edited this page Dec 16, 2015
·
1 revision
namespace Famework\Config
This class offers a full configuration file handler.
This is the constructor of Famework_Config.
Throws Famework_Exception_Config_Invalidconfig
$config = new Famework\Config\Famework_Config(string $config);
Parameter | Purpose |
---|---|
config | The path to a config (.ini) file or the configuration as a string |
Loads a new config file or config string.
Throws Famework_Exception_Config_Invalidconfig
void loadConfig(string $config)
Parameter | Purpose |
---|---|
config | The path to a config (.ini) file or the configuration as a string |
Returns a config group as an array.
array getGroup(string $name [, $strict = FALSE])
Parameter | Purpose |
---|---|
name | The name of the config section |
strict | If this is set to true, a Famework_Exception_Config_Nosuchgroup will get thrown if no such section exists |
RETURN | key => value pairs of the config section |
Returns all values with a certain key, no matter in which section they are.
array getByKey(string $searchkey)
Parameter | Purpose |
---|---|
searchkey | The name to search for |
RETURN | array(array('value' => x, 'group' => y)) |
Returns the value of a certain key in a certain section.
string getValue(string $group, string $key)
Parameter | Purpose |
---|---|
group | The name of the config section |
key | The name of the config entry within the given section |
RETURN | The actual value from the config as string |
- Home
- Getting Started
- Server Setup
- Configuration Files
- Application Structure
- Classes