jjok/config

This package is abandoned and no longer maintained. No replacement package was suggested.

A simple configuration class.

2.0.1 2013-09-25 16:21 UTC

This package is not auto-updated.

Last update: 2020-01-19 16:57:45 UTC


README

Build Status

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