Skip to content

wakforks/Seagull

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

Seagull

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');

About

Create configuration values on paths

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%