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

v2.0.1 2025-10-05 10:45 UTC

This package is auto-updated.

Last update: 2025-10-17 14:04:56 UTC


README

Latest Version on Packagist Total Downloads License Tests

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

๐Ÿ‘จโ€๐Ÿ’ป Author

Kirill Kolesnikov

๐Ÿ“œ License

MIT