private function getValidator($className, $constructorArgs)
    {
        /** @var ValidationInterface $validator */
        $validator = is_string($className) ? new $className($constructorArgs) : $className;
        if (!$validator instanceof ValidationInterface) {
            throw new BootException(sprintf('System validator was given a validation class %s that does not implement %s', $className, ValidationInterface::class));
        }
        if ($validator instanceof PathResolverAwareInterface) {
            $validator->setPathResolver($this->pathResolver);
        }
        if ($validator instanceof ConfigAwareInterface) {
            $validator->setConfig($this->configManager);
        }
        if ($validator instanceof FlashLoggerAwareInterface) {
            $validator->setFlashLogger($this->flashLogger);
        }

        return $validator;
    }
private function getValidator($className, $constructorArgs)
    {
        /** @var ValidationInterface $validator */
        $validator = is_string($className) ? new $className($constructorArgs) : $className;
        if (!$validator instanceof ValidationInterface) {
            throw new BootException(sprintf('System validator was given a validation class %s that does not implement %s', $className, ValidationInterface::class));
        }
        if ($validator instanceof PathResolverAwareInterface) {
            $validator->setPathResolver($this->pathResolver);
        }
        if ($validator instanceof ConfigAwareInterface) {
            $validator->setConfig($this->configManager);
        }
        if ($validator instanceof FlashLoggerAwareInterface) {
            $validator->setFlashLogger($this->flashLogger);
        }

        return $validator;
    }
private function getValidator ( $ className , $ constructorArgs ) { /** @var ValidationInterface $validator */ $ validator = is_string ( $ className ) ? new $ className ( $ constructorArgs ) : $ className ; if ( ! $ validator instanceof ValidationInterface ) { throw new BootException ( sprintf ( 'System validator was given a validation class %s that does not implement %s' , $ className , ValidationInterface :: class ) ) ; } if ( $ validator instanceof PathResolverAwareInterface ) { $ validator -> setPathResolver ( $ this -> pathResolver ) ; } if ( $ validator instanceof ConfigAwareInterface ) { $ validator -> setConfig ( $ this -> configManager ) ; } if ( $ validator instanceof FlashLoggerAwareInterface ) { $ validator -> setFlashLogger ( $ this -> flashLogger ) ; } return $ validator ; }
Get a validator object from a given class name.

@param string|ValidationInterface $className
@param mixed                      $constructorArgs

@return ValidationInterface
Get a validator object from a given class name .