Support config PROJECT_PATH_CONFIG
and PROJECT_PATH_SPECIFIC
via environment variables (#1270)
This commit is contained in:
parent
ae0a34d324
commit
cc3eca1dc5
1 changed files with 16 additions and 2 deletions
|
@ -163,11 +163,25 @@ class Framework extends \Flake\Core\Framework {
|
||||||
|
|
||||||
define("PROJECT_PATH_CORE", PROJECT_PATH_ROOT . "Core/");
|
define("PROJECT_PATH_CORE", PROJECT_PATH_ROOT . "Core/");
|
||||||
define("PROJECT_PATH_CORERESOURCES", PROJECT_PATH_CORE . "Resources/");
|
define("PROJECT_PATH_CORERESOURCES", PROJECT_PATH_CORE . "Resources/");
|
||||||
define("PROJECT_PATH_SPECIFIC", PROJECT_PATH_ROOT . "Specific/");
|
|
||||||
define("PROJECT_PATH_CONFIG", PROJECT_PATH_ROOT . "config/");
|
|
||||||
define("PROJECT_PATH_FRAMEWORKS", PROJECT_PATH_CORE . "Frameworks/");
|
define("PROJECT_PATH_FRAMEWORKS", PROJECT_PATH_CORE . "Frameworks/");
|
||||||
define("PROJECT_PATH_WWWROOT", PROJECT_PATH_CORE . "WWWRoot/");
|
define("PROJECT_PATH_WWWROOT", PROJECT_PATH_CORE . "WWWRoot/");
|
||||||
|
|
||||||
|
// set PROJECT_PATH_CONFIG from BAIKAL_PATH_CONFIG
|
||||||
|
$baikalPathConfig = getenv('BAIKAL_PATH_CONFIG');
|
||||||
|
if ($baikalPathConfig !== false) {
|
||||||
|
define("PROJECT_PATH_CONFIG", $baikalPathConfig);
|
||||||
|
} else {
|
||||||
|
define("PROJECT_PATH_CONFIG", PROJECT_PATH_ROOT . "config/");
|
||||||
|
}
|
||||||
|
|
||||||
|
// set PROJECT_PATH_SPECIFIC from BAIKAL_PATH_CONFIG
|
||||||
|
$baikalPathConfig = getenv('BAIKAL_PATH_SPECIFIC');
|
||||||
|
if ($baikalPathConfig !== false) {
|
||||||
|
define("PROJECT_PATH_SPECIFIC", $baikalPathConfig);
|
||||||
|
} else {
|
||||||
|
define("PROJECT_PATH_SPECIFIC", PROJECT_PATH_ROOT . "Specific/");
|
||||||
|
}
|
||||||
|
|
||||||
require_once PROJECT_PATH_CORE . "Distrib.php";
|
require_once PROJECT_PATH_CORE . "Distrib.php";
|
||||||
|
|
||||||
define("PROJECT_PATH_DOCUMENTROOT", PROJECT_PATH_ROOT . "html/");
|
define("PROJECT_PATH_DOCUMENTROOT", PROJECT_PATH_ROOT . "html/");
|
||||||
|
|
Loading…
Reference in a new issue