1: <?php
2: /**
3: * Represents a collection of constraints, if any are true, the collection will evaluate to true.
4: *
5: * @author James Pepin <james@jamespepin.com>
6: * @author Chuck Hagenbuch <chuck@horde.org>
7: */
8: class Horde_Constraint_Or extends Horde_Constraint_Coupler
9: {
10: public function evaluate($value)
11: {
12: foreach ($this->_constraints as $c) {
13: if ($c->evaluate($value)) {
14: return true;
15: }
16: }
17: return false;
18: }
19: }
20: