Simple configuration loader and helper for PHP applications

v2.0.0 2025-09-28 06:43 UTC

This package is auto-updated.

Last update: 2025-09-28 06:45:19 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

// get values
$name = config('app.name', 'Default');
$dbHost = config('database.host');

// set values dynamically
config(['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