ValidationLogicCriteria::__call PHP 메소드

__call() 공개 메소드

Wildcard method for applying all the possible conditions
public __call ( sting $method, array $args ) : ValidationLogicCriteria
$method sting The method name
$args array The arguments
리턴 ValidationLogicCriteria
    public function __call($method, $args)
    {
        if (in_array($method, array_keys($this->config()->comparisons))) {
            $val = isset($args[0]) ? $args[0] : null;
            if (substr($method, 0, 2) == "is") {
                $operator = substr($method, 2);
            } else {
                $operator = $method;
                //				$operator = ucwords($method);
            }
            $this->addCriterion(ValidationLogicCriterion::create($this->master, $operator, $val, $this));
            return $this;
        }
        return parent::__call($method, $args);
    }