Closed hanneskod closed 6 years ago
This potentially opens a lot of possibilities:
-c
, —configuration
optiongiroapp.ini.dist
DEFAULT_GIROAPP_CONFIG
env varImplementation ideas:
class ConfigManager
{
Function loadFile(ConfigFile $configFile): void;
Function getConfig(string $name): ConfigInterface;
}
Class Config
{
Function getValue(): string;
}
If Config
is a promise like this values can be loaded in container (first defaults and then specifics if file exists) and overwritten in command (if specified on command line) and then read throughout the application when needed..
ConfigFile
as a simple parse_ini_string()
wrapper.
To be able to support different database engines we need to bootstrap from settings outside of the db.
A simple
ini
file should do it. No need for fancy data..What will happen whit the
init
command?