jjok / config
A simple configuration class.
Installs: 5 670
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2020-01-19 16:57:45 UTC
README
A simple configuration class.
Examples
$config = new \jjok\Config\Config();
# Set a value
$config->set('some_setting', 'Some Value');
try {
# Get a value that has been set
echo $config->get('some_setting');
# Trying to get a value that hasn't been set throws an exception
echo $config->get('fdg');
}
catch(\Exception $e) {
echo $e->getMessage();
}
Get configuration instance in one line:
return new \jjok\Config\Config(array(
'some_setting' => 'Some Value',
'some_other_setting' => 'Some Other Value'
));
Run tests
phpunit
Copyright (c) 2013 Jonathan Jefferies