seagull / seagull
Tree like configuration manager
Installs: 1 942
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 17
Forks: 1
Open Issues: 1
This package is not auto-updated.
Last update: 2024-04-13 11:25:41 UTC
README
First, this is called Seagull, a very far fetched reference to a seagull intersection.
Settings on intersections
This is a tiny library to help you out with your settings and let's you access them with a syntax that resembles the use of namespaces. The way it works is best explained with an example. Start by adding settings to a new object. This can be done in several ways.
// instantiate Seagull and pass a config to the constructor $values = array( 'db' => array( 'default' => array( 'host' => 'localhost', 'user' => 'root', ... ) ), ... ); $config = new Seagull($values); // values can also be set, or added, using the setter: $config->set('db.default.user', 'root'); // or, take a route to halfway, and the rest with an array: $config->set('db.default', array( 'host' => 'localhost', 'user' => 'root' )); // your configuration can be accessed like this: $db_user = $config->get('db.default.user'); $default_db_settings = $config->get('db.default');