bogosoft / configuration
Application configuration contracts and minimal implementations for PHP 7.4+
Installs: 33
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/bogosoft/configuration
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'.