codemonster-ru / config
Simple configuration loader and helper for PHP applications
v2.0.0
2025-09-28 06:43 UTC
Requires
- php: >=8.2
Requires (Dev)
- phpunit/phpunit: ^9.6 || ^10.5 || ^11.0 || ^12.0
README
Simple configuration loader and helper for PHP applications.
๐ฆ Installation
composer require codemonster-ru/config
๐ Usage
1. Load config files
use Codemonster\Config\Config; Config::load(__DIR__ . '/config');
2. Access config values
// get values $name = config('app.name', 'Default'); $dbHost = config('database.host'); // set values dynamically config(['app.debug' => true]); // get all configs $all = Config::all();
๐ Example config file (config/app.php
)
<?php return [ 'name' => 'Codemonster', 'debug' => false, ];
๐งช Testing
composer test