버그 수정...

This commit is contained in:
2019-10-06 14:49:41 +09:00
parent 46acfe9470
commit 617ca22f2d
28 changed files with 115 additions and 102 deletions
+9 -2
View File
@@ -26,6 +26,8 @@ abstract class Constraint{
protected $nation = null;
protected $arg = null;
protected $env = null;
protected $cmd_arg = null;
protected $destGeneral = null;
@@ -62,6 +64,11 @@ abstract class Constraint{
$this->tested = false;
$this->reason = null;
}
public function setEnv($env){
$this->env = $env;
$this->tested = false;
$this->reason = null;
}
public function setCmdArg($cmd_arg){
$this->cmd_arg = $cmd_arg;
$this->tested = false;
@@ -182,7 +189,7 @@ abstract class Constraint{
return $this->reason;
}
public static function testAll(array $constraintPacks, array $input):?string{
public static function testAll(array $constraintPacks, array $input, array $env):?string{
foreach($constraintPacks as $constraintArgs){
if (!$constraintArgs){
continue;
@@ -194,7 +201,7 @@ abstract class Constraint{
$constraint = call_user_func($method,$input);
assert($constraint instanceof Constraint);
$constraint->setEnv($env);
if(count($constraintArgs) == 2){
$arg = $constraintArgs[1];
$constraint->setArg($arg);