rock\sanitize\Sanitize::__call PHP Method

__call() public method

public __call ( $name, $arguments )
    public function __call($name, $arguments)
    {
        if (method_exists($this, "{$name}Internal")) {
            return call_user_func_array([$this, "{$name}Internal"], $arguments);
        }
        if (!isset($this->rules[$name])) {
            throw new SanitizeException("Unknown rule: {$name}");
        }
        if (!class_exists($this->rules[$name])) {
            throw new SanitizeException(SanitizeException::UNKNOWN_CLASS, ['class' => $this->rules[$name]]);
        }
        $rule = $this->getInstanceRule($name, $arguments);
        $this->rawRules[] = $rule;
        return $this;
    }