bsfp/config

framework

dev-master 2018-11-11 23:54 UTC

This package is auto-updated.

Last update: 2024-04-12 11:27:50 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