dframe / config
Config component Dframe
v4.2.0
2022-10-28 13:54 UTC
Requires
- php: >=7.3
- ext-json: *
Requires (Dev)
- mikey179/vfsstream: ^1.6
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-10-28 16:36:48 UTC
README
Documentation - Config PHP
Composer
$ composer require dframe/config
Standalone
use Dframe\Config\Config; include_once 'vendor/autoload.php'; $configPath = __DIR__. DIRECTORY_SEPARATOR . 'config'. DIRECTORY_SEPARATOR; $config = Config::load('ConfigFile', $configPath); $config->get('key1'); // Return value $config->get('keyValid', 'yes'); // return 'yes' || if key does not exist then you can replace value
License
Open-sourced software licensed under the MIT license