Wallogit.com
2017 © Pedro Peláez
A library for configuration management in Openclerk., (*1)
Include openclerk/config as a requirement in your project composer.json,
and run composer update to install it into your project:, (*2)
{
"require": {
"openclerk/config": "dev-master"
},
"repositories": [{
"type": "vcs",
"url": "https://github.com/openclerk/config"
}]
}
Initialise configuration before use:, (*3)
Openclerk\Config::merge(array( "database_name" => "clerk", "database_username" => "username", "database_password" => "password", // any other values here ));
You can now load configuration values at runtime:, (*4)
echo Openclerk\Config::get("my_key", "default");