ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
Composite.php
Go to the documentation of this file.
1<?php
2
13{
14
20 public $defs;
21
25 public function __construct($defs)
26 {
27 $this->defs = $defs;
28 }
29
36 public function validate($string, $config, $context)
37 {
38 foreach ($this->defs as $i => $def) {
39 $result = $this->defs[$i]->validate($string, $config, $context);
40 if ($result !== false) {
41 return $result;
42 }
43 }
44 return false;
45 }
46}
47
48// vim: et sw=4 sts=4
$result
Allows multiple validators to attempt to validate attribute.
Definition: Composite.php:13
validate($string, $config, $context)
Definition: Composite.php:36
$defs
List of objects that may process strings.
Definition: Composite.php:20
Base class for all validating attribute definitions.
Definition: AttrDef.php:14