viloveul / config
Base Configuration for Viloveul Components.
Installs: 161
Dependents: 2
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/viloveul/config
Requires
- php: ~7.0
- viloveul/support: v1.*|v1.x-dev
- vlucas/phpdotenv: 2.5.*
Requires (Dev)
- codeception/codeception: ^2.5
README
Installation
make sure your php version > 7.0
composer require viloveul/config
HOW
require __DIR__ . '/vendor/autoload.php'; $config = new Viloveul\Config\Configuration([ 'key' => 'value' ]); $config->setFoo('bar'); $config->bar = 'baz'; $config['main'] = 'item'; $otherConfig = Viloveul\Config\ConfigFactory::load('/path/to/your/config/file.php'); $anotherConfig = new Viloveul\Config\Configuration([ 'hello' => 'world' ]); $otherAnotherConfig = new Viloveul\Config\Configuration([ 'key' => 'dor' ]); $anotherOtherAnotherConfig = new Viloveul\Config\Configuration([ 'foo' => 'ssstttt' ]); $config->merge($otherConfig); $config->merge($anotherConfig); $config->merge($anotherConfig, false); $config->merge($anotherOtherAnotherConfig, true); var_dump($config->all());