ConstraintHelper 추가

This commit is contained in:
2018-11-15 03:33:44 +09:00
parent 2cb7513355
commit c3699a8595
44 changed files with 588 additions and 168 deletions
+3 -3
View File
@@ -3,7 +3,7 @@
namespace sammo\Constraint;
class OccupiedCity extends Constraint{
const REQ_VALUES = Constraint::REQ_GENERAL|Constraint::REQ_CITY;
const REQ_VALUES = Constraint::REQ_GENERAL|Constraint::REQ_CITY|Constraint::REQ_BOOLEAN_ARG;
public function checkInputValues(bool $throwExeception=true){
if(!parent::checkInputValues($throwExeception) && !$throwException){
@@ -27,8 +27,8 @@ class OccupiedCity extends Constraint{
$this->checkInputValues();
$this->tested = true;
//특수 예외로 ARG가 지정된 경우에는 재야여도 'OccupiedCity'로 허용함
if($this->arg && $this->general['nation'] == 0){
//재야여도 허용하는 경우
if($this->arg[0] && $this->general['nation'] == 0){
return true;
}