yidemir / config
Tiny configuration management in PHP
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/yidemir/config
Requires
- php: >=7.1.0
Requires (Dev)
- phpunit/phpunit: ^7
This package is auto-updated.
Last update: 2022-03-13 21:56:54 UTC
README
Introduction
Tiny configuration management in PHP
Features
- Tiny size
- Simple getter and setter methods
- Array dot notation
- Helper function
Installation
$ composer require yidemir/config
Test
composer test
Usage
use Demir\Config\Config; $config = [ 'foo' => 'bar', 'app' => [ 'name' => 'baz' ] ]; new Config($config); // getter $foo = Config::get('foo'); // bar $name = Config::get('app.name'); // baz // setter Config::set('foo', 'qux'); Config::set('app.name', 'mux'); // helper config(['app.name' => 'data']); // setter config('app.name'); // getter, result: data