codemonster-ru / config
Lightweight configuration loader for PHP applications
Installs: 47
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/codemonster-ru/config
Requires
- php: >=8.2
Requires (Dev)
- phpunit/phpunit: ^9.6 || ^10.5 || ^11.0 || ^12.0
This package is auto-updated.
Last update: 2025-10-17 14:04:56 UTC
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
use Codemonster\Config\Config; // get values $name = Config::get('app.name', 'Default'); $dbHost = Config::get('database.host'); // set values dynamically Config::set('app.debug', true); // get all configs $all = Config::all();
๐ Example config file (config/app.php)
<?php return [ 'name' => 'Codemonster', 'debug' => false, ];
๐งช Testing
composer test