버그 수정...
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user