src/Leevel/Validate/Validator.php
protected function callClassExtend(string $extend, array $parameter): bool
    {
        if (!$this->container) {
            throw new InvalidArgumentException('Container was not set.');
        }

        if (false === strpos($extend, '@')) {
            $className = $extend;
            $method = 'handle';
        } else {
            list($className, $method) = explode('@', $extend);
        }

        if (!is_object($extend = $this->container->make($className))) {
            $e = sprintf('Extend class %s is not valid.', $className);

            throw new InvalidArgumentException($e);
        }

        $parameter[] = $this;

        return $extend->{$method}(...$parameter);
    }
protected function callClassExtend(string $extend, array $parameter): bool
    {
        if (!$this->container) {
            throw new InvalidArgumentException('Container was not set.');
        }

        if (false === strpos($extend, '@')) {
            $className = $extend;
            $method = 'handle';
        } else {
            list($className, $method) = explode('@', $extend);
        }

        if (!is_object($extend = $this->container->make($className))) {
            $e = sprintf('Extend class %s is not valid.', $className);

            throw new InvalidArgumentException($e);
        }

        $parameter[] = $this;

        return $extend->{$method}(...$parameter);
    }
调用自定义验证器类.

@param string $extend
@param array  $parameter

@return bool