bogosoft / configuration
Application configuration contracts and minimal implementations for PHP 7.4+
3.0.0
2019-12-20 00:40 UTC
Requires
- php: >=7.4
- bogosoft/core: ^2
Requires (Dev)
- phpunit/phpunit: ^8.5
README
This library contains contracts and implementations for working with application configurations.
Requirements
- PHP 7.4+
bogosoft/core
Installation
composer require bogosoft/configuration
Usage
# # Start with an array of values. # $values = [ 'database:customers:host' => 'db.example.com', 'database:customers:password' => '12345', 'database:customers:port' => '3306', 'database:customers:username' => 'root' ]; # # Convert the array into a configuration. # $config = new Bogosoft\Configuration\SimpleConfiguration($values); # # Values can be access from the configuration as if it were an array. # $port = $config->get('database:customers:port'); // Returns, '3306'.