switch / config
Switch Framework Configuration Package
dev-master
2026-08-11 02:44 UTC
Requires
- php: >=8.2
This package is auto-updated.
Last update: 2026-08-11 02:51:15 UTC
README
A flexible configuration loader supporting nested dot-notation access, default values, and environment variable overrides.
📦 Installation
composer require switch/config
🚀 Usage
use Switch\Config\Config; $config = new Config([ 'app' => ['name' => 'Switch App', 'debug' => true], 'db' => ['host' => '127.0.0.1', 'port' => 5432] ]); // Dot-notation retrieval echo $config->get('app.name'); echo $config->get('db.host', 'localhost'); // ArrayAccess syntax $config['app.debug'] = false;
📄 License
MIT License.