codin/config

Basic config file load supports PHP ans Json files

0.1.0 2020-08-22 14:45 UTC

This package is auto-updated.

Last update: 2024-04-28 18:17:00 UTC


README

Lightweight configuration file loader that supports PHP and JSON files

$ cat path/to/config/foos.php
<?php return ['foo' => 'bar'];

$ cat path/to/config/bars.json
{"bar":"baz"}
$config = Codin\Config\Config::create('path/to/config');
$config->has('foos.foo'); // true
$config->get('foos.foo'); // "bar"
$config->has('bars'); // true
$config->get('bars'); // ['bar' => 'baz']