brofist / configuration
Handles merging of configurations
Installs: 761
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/brofist/configuration
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: 2025-09-28 01:49:21 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.