src/Schema.php
public function setValidationClass($class) {
        trigger_error('Schema::setValidationClass() is deprecated. Use Schema::setValidationFactory() instead.', E_USER_DEPRECATED);

        if (!is_a($class, Validation::class, true)) {
            throw new \InvalidArgumentException("$class must be a subclass of ".Validation::class, 500);
        }

        $this->setValidationFactory(function () use ($class) {
            if ($class instanceof Validation) {
                $result = clone $class;
            } else {
                $result = new $class;
            }
            return $result;
        });
        $this->validationClass = $class;
        return $this;
    }
public function setValidationClass($class) {
        trigger_error('Schema::setValidationClass() is deprecated. Use Schema::setValidationFactory() instead.', E_USER_DEPRECATED);

        if (!is_a($class, Validation::class, true)) {
            throw new \InvalidArgumentException("$class must be a subclass of ".Validation::class, 500);
        }

        $this->setValidationFactory(function () use ($class) {
            if ($class instanceof Validation) {
                $result = clone $class;
            } else {
                $result = new $class;
            }
            return $result;
        });
        $this->validationClass = $class;
        return $this;
    }
public function setValidationClass ( $ class ) { trigger_error ( 'Schema::setValidationClass() is deprecated. Use Schema::setValidationFactory() instead.' , E_USER_DEPRECATED ) ; if ( ! is_a ( $ class , Validation :: class , true ) ) { throw new \ InvalidArgumentException ( "$class must be a subclass of " . Validation :: class , 500 ) ; } $ this -> setValidationFactory ( function ( ) use ( $ class ) { if ( $ class instanceof Validation ) { $ result = clone $ class ; } else { $ result = new $ class ; } return $ result ; } ) ; $ this -> validationClass = $ class ; return $ this ; }
Set the class that's used to contain validation information.

@param Validation|string $class Either the name of a class or a class that will be cloned.
@return $this
@deprecated
Set the class that s used to contain validation information .