switch/config

Switch Framework Configuration Package

Maintainers

Package info

github.com/celionatti/switch-config

pkg:composer/switch/config

Transparency log

Statistics

Installs: 0

Dependents: 1

Suggesters: 1

Stars: 0

Open Issues: 0

dev-master 2026-08-11 02:44 UTC

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.