public static function validate( HppRequest $hppRequest ) {
		self::Initialise();

		$violations = self::$validator->validate( $hppRequest );

		if ( $violations->count() > 0 ) {
			$validationMessages = array();

			foreach ( $violations as $violation ) {

				/* @var ConstraintViolationInterface $violation */
				$validationMessages[] = $violation->getMessage();
			}

			$message = "HppRequest failed validation with the following errors:";
			foreach ( $validationMessages as $validationMessage ) {
				$message .= $validationMessage . '.';
			}

			self::$logger->info( $message );
			throw new RealexValidationException( "HppRequest failed validation", $validationMessages );
		}

	}
public static function validate( HppRequest $hppRequest ) {
		self::Initialise();

		$violations = self::$validator->validate( $hppRequest );

		if ( $violations->count() > 0 ) {
			$validationMessages = array();

			foreach ( $violations as $violation ) {

				/* @var ConstraintViolationInterface $violation */
				$validationMessages[] = $violation->getMessage();
			}

			$message = "HppRequest failed validation with the following errors:";
			foreach ( $validationMessages as $validationMessage ) {
				$message .= $validationMessage . '.';
			}

			self::$logger->info( $message );
			throw new RealexValidationException( "HppRequest failed validation", $validationMessages );
		}

	}
public static function validate ( HppRequest $ hppRequest ) { self :: Initialise ( ) ; $ violations = self :: $ validator -> validate ( $ hppRequest ) ; if ( $ violations -> count ( ) > 0 ) { $ validationMessages = array ( ) ; foreach ( $ violations as $ violation ) { /* @var ConstraintViolationInterface $violation */ $ validationMessages [ ] = $ violation -> getMessage ( ) ; } $ message = "HppRequest failed validation with the following errors:" ; foreach ( $ validationMessages as $ validationMessage ) { $ message .= $ validationMessage . '.' ; } self :: $ logger -> info ( $ message ) ; throw new RealexValidationException ( "HppRequest failed validation" , $ validationMessages ) ; } }
Method validates HPP request object using JSR-303 bean validation.

@param HppRequest|HppResponse $hppRequest
Method validates HPP request object using JSR - 303 bean validation .