use apache env vars to load different config files

master
Guillermo Dev 7 years ago
parent 178b8d81ba
commit 21f1e77556

@ -71,7 +71,8 @@ class Configuration {
public static function getConfigFilePath()
{
if (null === self::$customConfigFilePath) {
self::$customConfigFilePath = realpath(dirname(__FILE__) . '/../../../../../../config/configuration.local.php');
$envfile = apache_getenv('APPLICATION_ENV') === 'development' ? 'local' : 'global';
self::$customConfigFilePath = realpath(dirname(__FILE__) . "/../../../../../../config/configuration.$envfile.php");
}
return self::$customConfigFilePath;
}

Loading…
Cancel
Save