forked from skeeks-cms/cms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp-config.php
More file actions
39 lines (34 loc) · 884 Bytes
/
Copy pathapp-config.php
File metadata and controls
39 lines (34 loc) · 884 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
/**
* @author Semenov Alexander <semenov@skeeks.com>
* @link http://skeeks.com/
* @copyright 2010 SkeekS (СкикС)
* @date 17.04.2016
*/
$configCommon = [];
if (file_exists(COMMON_CONFIG_DIR . '/main.php'))
{
$configCommon = (array) include COMMON_CONFIG_DIR . '/main.php';
}
$configCommonEnv = [];
if (file_exists(COMMON_ENV_CONFIG_DIR . '/main.php'))
{
$configCommonEnv = (array) include COMMON_ENV_CONFIG_DIR . '/main.php';
}
$configApp = [];
if (file_exists(APP_CONFIG_DIR . '/main.php'))
{
$configApp = (array) include APP_CONFIG_DIR . '/main.php';
}
$configAppEnv = [];
if (file_exists(APP_ENV_CONFIG_DIR . '/main.php'))
{
$configAppEnv = (array) include APP_ENV_CONFIG_DIR . '/main.php';
}
$configData = \yii\helpers\ArrayHelper::merge(
$configCommon,
$configCommonEnv,
$configApp,
$configAppEnv
);
return (array) $configData;