Configure your application using .ini, .json, .yaml or .neon files or a DB (MySQL or DynamoDB)
PHP Makefile
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src/Jasny
tests
.gitignore
.travis.yml
LICENSE
README.md
apigen.neon
composer.json
phpunit.xml.dist

README.md

Jasny's Config class

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