getDB(), getRootDB()를 autoload 클래스로 변경

- 각각 DB::db(), RootDB::db()임.
This commit is contained in:
2018-03-25 00:07:37 +09:00
parent bb1a496835
commit 9e1aadf486
62 changed files with 258 additions and 269 deletions
+2 -2
View File
@@ -8,7 +8,7 @@
function getScenario() {
//FIXME: 정말로 side effect가 없으려면 query는 밖으로 이동해야함.
$scenario = getDB()->queryFirstColumn('select `scenario` from `game` where no=1');
$scenario = DB::db()->queryFirstColumn('select `scenario` from `game` where no=1');
switch($scenario) {
case 0: $str = '공백지모드'; break;
@@ -626,7 +626,7 @@ function getBill($dedication) {
function getCost($armtype) {
//FIXME: 정말로 side effect가 없으려면 query는 밖으로 이동해야함.
//TODO: 병종 값이 column으로 들어있는건 전혀 옳지 않음. key->value 형태로 바꿔야함
return getDB()->queryFirstColumn('select %b from game where no=1', sprintf('cst%d', $armtype));
return DB::db()->queryFirstColumn('select %b from game where no=1', sprintf('cst%d', $armtype));
}
function TechLimit($startyear, $year, $tech) {