general)){ if(!$throwExeception){return false; } throw new \InvalidArgumentException("require troop in general"); } return true; } public function test():bool{ $this->checkInputValues(); $this->tested = true; //XXX: 부대장인지 알 수가 없음 $db = DB::db(); $troopLeader = $db->queryFirstField('SELECT no FROM troop WHERE troop = %i', $this->general['troop']); if($troopLeader == $this->general['no']){ return true; } $this->reason = "부대장이 아닙니다."; return false; } }