Files
server/usr/share/psa-pear/pear/php/Horde/Constraint/Or.php
2026-01-07 20:52:11 +01:00

20 lines
479 B
PHP

<?php
/**
* Represents a collection of constraints, if any are true, the collection will evaluate to true.
*
* @author James Pepin <james@jamespepin.com>
* @author Chuck Hagenbuch <chuck@horde.org>
*/
class Horde_Constraint_Or extends Horde_Constraint_Coupler
{
public function evaluate($value)
{
foreach ($this->_constraints as $c) {
if ($c->evaluate($value)) {
return true;
}
}
return false;
}
}