Simple array config access
Install this package via composer:
composer install ignition-studios/config
Config expects an associative array as the constructor input.
It has one method which will return the value of the specified key.
$config = new Config([
"api" => [
"user" => "Alex",
"pass" => "sEcReT",
],
"theme" => "dark",
]);
$config->get("theme");
<!-- dark -->
$config->get("api");
<!--
[
"user" => "Alex",
"pass" => "sEcReT",
]
-->
The get()
method will return a default value if the key is not found
$config->get("size", "medium");
<!-- medium -->
Please see CHANGELOG for more information on what has changed recently.
$ make test
Please see CONTRIBUTING for details.
The code in this repository is proprietary, unauthorised reproduction or distribution is forbidden. Written authorisation may only be granted by a Director of Ignition Studios Ltd.