Stop using a singleton for Config (#298)
This commit is contained in:
parent
6fc294afbe
commit
7e2afd8221
14 changed files with 87 additions and 169 deletions
|
@ -19,10 +19,10 @@ class ConfigFactory
|
|||
{
|
||||
$configPath = __DIR__ . '/../config/config.yml';
|
||||
if (is_file($configPath)) {
|
||||
Config::setFile($configPath);
|
||||
$config = Config::fromFile($configPath);
|
||||
} else {
|
||||
$config = new Config();
|
||||
}
|
||||
|
||||
$config = Config::getInstance();
|
||||
if ($config->uglyUrls) {
|
||||
$container['router'] = new UglyRouter();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue