jasny/config

Configure your application. You can load .ini, .json, .yaml or .neon files or a MySQL DB.

Installs: 1 019

Dependents: 1

Stars: 8

Watchers: 1

Forks: 1

Open Issues: 1

Language: PHP

v1.2.0 2015-08-21 11:20 UTC

README

Build Status Coverage Status SensioLabsInsight

Configure your application. You can load .ini, .json and .yaml files or MySQL DB.

Installation

Jasny Config is registred at packagist as jasny/config and can be easily installed using composer. Alternatively you can simply download the .zip and copy the file from the 'src' folder.

Example

<?php
    use Jasny\Config;

    Config::i()->load('settings.yaml');
    Config::i()->db = new Config('db.ini');
    Config::i()->env = ($tmp = getenv('APPLICATION_ENV')) ? $tmp : 'prod';
    Config::i()->load("$env.yaml", array('optional'=>true));

API documentation (generated)

http://jasny.github.com/Config/docs