dev-master
9999999-devDot notation access of configuration, as well as overrides via $_ENV
MIT
The Development Requires
by Mellisa Hankins
silverstripe utilities mwm
Dot notation access of configuration, as well as overrides via $_ENV
Dot notation access of configuration, as well as overrides via $_ENV (environment variables), (*1)
This is the new way to access configuration. Instead of using Config::inst()->get('Email', 'admin_email')
you can now use singleton('env')->get('Email.admin_email')
. But that is not its real feature., (*2)
singleton('env')->get('Email.site_emails.staff')
singleton('env')->get('FacebookPage|Facebook.admin_id')
For development, you can use a .env.php file to override variables, but it requires some manual installation., (*3)
You need to install the package: vlucas/phpdotenv via composer.json, and then follow the instructions in that package., (*4)
If you want the environment to work, you should add the following to your ss_environment.php
:, (*5)
require_once BASE_PATH . '/mwm-env/code/dev/Environment.php';
Add the following to your composer.json file, (*6)
"require" : { "milkyway-multimedia/ss-mwm-env": "~0.3" }
Dot notation access of configuration, as well as overrides via $_ENV
MIT
silverstripe utilities mwm