autoload 경로 재 변경
kakao를 별도의 namespace로 분리 외부 class의 namespace 문제 해결
This commit is contained in:
@@ -4,7 +4,7 @@ require_once(__dir__.'/../../d_setting/conf.php');
|
||||
/**
|
||||
* DB 객체 생성
|
||||
*
|
||||
* @return MeekroDB
|
||||
* @return \MeekroDB
|
||||
*/
|
||||
function getDB(){
|
||||
$host = '_tK_host_';
|
||||
@@ -17,7 +17,7 @@ function getDB(){
|
||||
static $uDB = null;
|
||||
|
||||
if($uDB === null){
|
||||
$uDB = new MeekroDB($host,$user,$password,$dbName,$port,$encoding);
|
||||
$uDB = new \MeekroDB($host,$user,$password,$dbName,$port,$encoding);
|
||||
$uDB->connect_options[MYSQLI_OPT_INT_AND_FLOAT_NATIVE] = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ function allButton() {
|
||||
$call = "설문조사";
|
||||
}
|
||||
|
||||
$templates = new League\Plates\Engine('templates');
|
||||
$templates = new \League\Plates\Engine('templates');
|
||||
|
||||
return $templates->render('allButton', [
|
||||
'call' => $call,
|
||||
@@ -156,7 +156,7 @@ function commandButton() {
|
||||
|
||||
function getMapHtml(){
|
||||
//NOTE: 필요한가?
|
||||
$templates = new League\Plates\Engine('templates');
|
||||
$templates = new \League\Plates\Engine('templates');
|
||||
|
||||
return $templates->render('map');
|
||||
}
|
||||
@@ -12,9 +12,6 @@ class Autoloader
|
||||
public static function register()
|
||||
{
|
||||
spl_autoload_register(function ($class) {
|
||||
if(util::starts_with($class, 'sammo\\')){
|
||||
$class = substr($class, strlen('sammo\\'));
|
||||
}
|
||||
$file = __DIR__.DIRECTORY_SEPARATOR.str_replace('\\', DIRECTORY_SEPARATOR, $class).'.php';
|
||||
if (file_exists($file)) {
|
||||
require $file;
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ namespace sammo;
|
||||
|
||||
function processWar($connect, $general, $city) {
|
||||
|
||||
$templates = new League\Plates\Engine('templates');
|
||||
$templates = new \League\Plates\Engine('templates');
|
||||
|
||||
global $_maximumatmos, $_maximumtrain, $_dexLimit;
|
||||
$date = substr($general['turntime'],11,5);
|
||||
|
||||
Reference in New Issue
Block a user