Skip to content
/ Config Public

Simple array access with subfolder overrides

Notifications You must be signed in to change notification settings

indgy/Config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Config

Simple array config access

Install

Install this package via composer:

composer install ignition-studios/config

Usage

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 -->

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

$ make test

Contributing

Please see CONTRIBUTING for details.

Credits

License

Proprietary

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.

About

Simple array access with subfolder overrides

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages