bsfp / config
framework
dev-master
2018-11-11 23:54 UTC
Requires
- ext-json: *
- symfony/yaml: ^4.1
Requires (Dev)
This package is auto-updated.
Last update: 2024-12-12 13:14:54 UTC
README
API
Configuration
new \BSFP\C(__DIR__ . '/path/to/configFolder');
Retrieve your config
\BSFP\C::get('filename');
Work with one level of folder and Yaml and Json files.
Demo
config/hello.json
{ "what": "world" }
index.php
<?php new \BSFP\C(__DIR__ . '/config'); echo 'Hello ' . \BSFP\C::get('hello')->get('what');
result:
php index.php
Hello world
Run tests
./vendor/bin/phpunit --bootstrap vendor/autoload.php tests