brofist / configuration
Handles merging of configurations
v0.1
2016-11-04 12:59 UTC
Requires
- php: >=5.4
Requires (Dev)
- phpunit/phpunit: ~4.8.21
- satooshi/php-coveralls: ~1.0.0
This package is not auto-updated.
Last update: 2024-11-09 21:01:34 UTC
README
Handles merging of configurations
Code information:
Package information:
Usage
<?php use Brofist\Configuration\Configuration; $development = new Configuration([ 'env' => 'development', 'admin' => [ 'name' => 'John', 'middleName' => 'Some Middle Name', ], ]); $production = new Configuration([ 'env' => 'production', 'admin' => [ 'name' => 'Other Name', 'lastName' => 'John', ], ]); $application = $development->merge($production); $application->toArray(); // will return [ // replaces when it is not an array 'env' => 'production', // merges when it is an array, replacing when necessary 'admin' => [ 'name' => 'Other Name', 'middleName' => 'Some Middle Name', 'lastName' => 'John', ], ];
Installing
composer require brofist/configuration
Issues/Features proposals
Here is the issue tracker.