jasny/config

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

v1.3.2 2015-12-21 00:58 UTC

README

Build Status Code Coverage Scrutinizer Code Quality 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.

composer require jasny/config

Example

use Jasny\Config;

$env = getenv('APPLICATION_ENV') ?: 'prod';

$config = new Config('settings.yml');
$config->db = new Config('db.ini');
$config->env = $env;
$config->load("$env.yml", array('optional'=>true)); // Overwrites existing settings