f_config/DB.php 제거

class_exists('RootDB')로 대체 가능
This commit is contained in:
2018-03-25 00:21:06 +09:00
parent 9e1aadf486
commit d777ca97c6
23 changed files with 31 additions and 39 deletions
+23 -5
View File
@@ -7,7 +7,6 @@ if(!defined('ROOT')){
class AppConf{
private static $serverList = null;
private static $rootSetting = null;
public static function getList(){
if(self::$serverList === null){
@@ -22,10 +21,29 @@ class AppConf{
return self::$serverList;
}
public static function getRoot(){
if(self::$rootSetting === null){
self::$rootSetting = new Setting(ROOT);
/**
* DB 객체 생성
*
* @return \MeekroDB
*/
public static function requireRootDB(){
if(!class_exists('RootDB')){
trigger_error('RootDB.php가 설정되지 않았습니다.', E_USER_ERROR);
die();
}
return self::$rootSetting;
return RootDB::db();
}
/**
* DB 객체 생성
*
* @return \MeekroDB
*/
public static function requireDB(){
if(!class_exists('DB')){
trigger_error('DB.php가 설정되지 않았습니다.', E_USER_ERROR);
die();
}
return DB::db();
}
}