Setting 클래스들 접근 방법을 변경

-global 없이 사용가능
-isExist()를 isExists()로 변경
This commit is contained in:
2018-03-19 00:30:52 +09:00
parent 95021f0887
commit 1c4709ea65
10 changed files with 24 additions and 17 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
require_once('_common.php');
require_once(ROOT.'/f_config/SETTING.php');
if($SETTING->isExist()) {
if($SETTING->isExists()) {
require_once($SETTING->getSettingFile());
} else {
Error('설정 파일이 없습니다. 설정을 먼저 하십시요!');
+1 -1
View File
@@ -3,7 +3,7 @@ require_once('_common.php');
require_once(ROOT.'/f_func/class._Mail.php');
require_once(ROOT.'/f_config/SETTING.php');
if($SETTING->isExist()) {
if($SETTING->isExists()) {
$MAIL = new _Mail();
} else {
Error('설정 파일이 없습니다. 설정을 먼저 하십시요!');
+14 -7
View File
@@ -17,10 +17,17 @@ define('MEMBER', 'member');
define('MANAGE', 'manage');
define('ICON', 'icon');
$serverList = [
'che'=>['체', 'white', new _Setting(__DIR__.'/../che')],
'kwe'=>['퀘', 'yellow', new _Setting(__DIR__.'/../kwe')],
'pwe'=>['풰', 'orange', new _Setting(__DIR__.'/../pwe')],
'twe'=>['퉤', 'magenta', new _Setting(__DIR__.'/../twe')],
'hwe'=>['훼', 'red', new _Setting(__DIR__.'/../hwe')]
];
function getServerConfigList(){
static $serverList = null;
if($serverList !== null){
return $serverList;
}
$serverList = [
'che'=>['체', 'white', new _Setting(__DIR__.'/../che')],
'kwe'=>['퀘', 'yellow', new _Setting(__DIR__.'/../kwe')],
'pwe'=>['풰', 'orange', new _Setting(__DIR__.'/../pwe')],
'twe'=>['퉤', 'magenta', new _Setting(__DIR__.'/../twe')],
'hwe'=>['훼', 'red', new _Setting(__DIR__.'/../hwe')]
];
return $serverList;
}