Gestalt is a simple, elegant PHP package for managing your framework's configuration values.
MIT License
ge·stalt (n): Something that is made of many parts and yet is somehow more than or different from the combination of its parts; broadly : the general quality or character of something.
Gestalt is a simple and elegant PHP package for managing your framework's configuration values. It is lightweight, flexible, framework agnostic, and has no dependencies other than PHP itself.
The following are just a few of the features Gestalt has to offer. Visit the docs for more on installation, usage, and features.
Basic Usage (Learn More)
$config = new Configuration([
'app' => [
'debug' => true,
'version' => '1.0',
],
]);
// Get values using dot notation or ArrayAccess.
$config->get('app.debug');
$config['app'];
// Add values using dot notation or ArrayAccess.
$config->add('app.locale', 'en');
$config['mail'] = ['driver' => 'MailMonkey'];
Custom Loading (Learn More)
$config = Configuration::load(new JsonFileLoader);
$config->get('app.debug');
Observers (Learn More)
$config = new Configuration($values);
$config->attach(new StatefulObserver);
// Notifies the StatefulObserver that the
// Configuration has been updated.
$config->set('app.debug', false);
Interested? Check out the docs to see all of the features in action!