f_config/app.php 삭제, AppConf 클래스로 통합
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
if(!defined('ROOT')){
|
||||
define('ROOT', '../..');
|
||||
}
|
||||
|
||||
class AppConf{
|
||||
private static $serverList = null;
|
||||
private static $rootSetting = null;
|
||||
|
||||
public static function getList(){
|
||||
if(self::$serverList === null){
|
||||
self::$serverList = [
|
||||
'che'=>['체', 'white', new Setting(ROOT.'/che')],
|
||||
'kwe'=>['퀘', 'yellow', new Setting(ROOT.'/kwe')],
|
||||
'pwe'=>['풰', 'orange', new Setting(ROOT.'/pwe')],
|
||||
'twe'=>['퉤', 'magenta', new Setting(ROOT.'/twe')],
|
||||
'hwe'=>['훼', 'red', new Setting(ROOT.'/hwe')]
|
||||
];
|
||||
}
|
||||
return self::$serverList;
|
||||
}
|
||||
|
||||
public static function getRoot(){
|
||||
if(self::$rootSetting === null){
|
||||
self::$rootSetting = new Setting(ROOT);
|
||||
}
|
||||
return self::$rootSetting;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
namespace sammo;
|
||||
|
||||
if(!defined('ROOT')){
|
||||
define('ROOT', '..');
|
||||
define('ROOT', '../..');
|
||||
}
|
||||
class Lock {
|
||||
private static $l = ROOT.'/d_log/lock.txt';
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
namespace sammo;
|
||||
|
||||
if(!defined('ROOT')){
|
||||
define('ROOT', '..');
|
||||
define('ROOT', '../..');
|
||||
}
|
||||
class Session {
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ class Setting {
|
||||
private $settingFile;
|
||||
private $exist = false;
|
||||
|
||||
public function __construct($basepath) {
|
||||
public function __construct($basepath = __DIR__.'/../..') {
|
||||
$this->basepath = $basepath;
|
||||
$this->settingFile = realpath($basepath.'/d_setting/conf.php');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user