Commit a404e00b by Qiang Xue

simplified rule execution [skip ci]

parent face5262
......@@ -151,16 +151,12 @@ abstract class Manager extends Component
*/
public function executeRule($ruleName, $params, $data)
{
if ($ruleName !== null) {
$rule = $this->getRule($ruleName);
if ($rule instanceof Rule) {
return $rule->execute($params, $data);
} else {
throw new InvalidConfigException("Rule not found: $ruleName");
}
} else {
return true;
}
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment