ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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
$context
Definition: webdav.php:25
Base class for all validating attribute definitions.
Definition: AttrDef.php:13
$config
Definition: bootstrap.php:15
$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
$i
Definition: disco.tpl.php:19
$def
Definition: croninfo.php:21