ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
SubjectConfirmationValidator.php
Go to the documentation of this file.
1<?php
2
4
10
12{
16 protected $constraints;
17
22
27
28 public function __construct(
31 ) {
32 $this->identityProvider = $identityProvider;
33 $this->serviceProvider = $serviceProvider;
34 }
35
36 public function addConstraintValidator(
38 ) {
39 if ($constraint instanceof IdentityProviderAware) {
40 $constraint->setIdentityProvider($this->identityProvider);
41 }
42
43 if ($constraint instanceof ServiceProviderAware) {
44 $constraint->setServiceProvider($this->serviceProvider);
45 }
46
47 $this->constraints[] = $constraint;
48 }
49
50 public function validate(SubjectConfirmation $subjectConfirmation)
51 {
52 $result = new Result();
53 foreach ($this->constraints as $validator) {
54 $validator->validate($subjectConfirmation, $result);
55 }
56
57 return $result;
58 }
59}
$result
An exception for terminatinating execution or to throw for unit testing.
Simple Result object.
Definition: Result.php:11
__construct(IdentityProvider $identityProvider, ServiceProvider $serviceProvider)
addConstraintValidator(SubjectConfirmationConstraintValidator $constraint)
Basic configuration wrapper.
Basic Configuration Wrapper.
Interface for triggering setter injection.
Interface for triggering setter injection.