ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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
Base class for all validating attribute definitions.
Definition: AttrDef.php:13
$result
Allows multiple validators to attempt to validate attribute.
Definition: Composite.php:12
$defs
List of objects that may process strings.
Definition: Composite.php:20
validate($string, $config, $context)
Definition: Composite.php:36