ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Validator.php
Go to the documentation of this file.
1<?php
2
4
6
8{
12 protected $constraints;
13
14 public function addConstraintValidator(ConstraintValidator $constraint)
15 {
16 $this->constraints[] = $constraint;
17 }
18
19 public function validate(Response $response)
20 {
21 $result = new Result();
22 foreach ($this->constraints as $validator) {
23 $validator->validate($response, $result);
24 }
25
26 return $result;
27 }
28}
$result
An exception for terminatinating execution or to throw for unit testing.
Simple Result object.
Definition: Result.php:11
validate(Response $response)
Definition: Validator.php:19
addConstraintValidator(ConstraintValidator $constraint)
Definition: Validator.php:14
$response