fas / configuration
Fast and simple configuration management
0.2.2
2021-07-09 21:12 UTC
Requires
- php: >=7.4.0
- symfony/yaml: ^5.2
Requires (Dev)
- phpmd/phpmd: ^2.10
- phpunit/phpunit: ^9
- squizlabs/php_codesniffer: ^3.6
README
Installation
composer require fas/configuration
Usage
A simple configuration file library.
database: host: mydbhost
<?php require __DIR__ . '/vendor/autoload.php'; use Fas\Configuration\DotNotation; use Fas\Configuration\YamlLoader; $configuration = new DotNotation(YamlLoader::loadWithOverrides('/app/config.yml')); var_dump($configuration->require('database.host'));
Output:
/app/test.php:9:
string(8) "mydbhost"