Search by

switch / config

celionatti

Switch Framework Configuration Package

dev-master 2026-08-27 17:42 UTC

This package is auto-updated.

Last update: 2026-08-27 18:03:32 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.