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

22 lines
488 B
PHP

<?php
/**
* Represents a collection of constraints, if one is false, this collection will
* evaluate to false
*
* Based on PHPUnit_Framework_Constraint_And
*
* @author James Pepin <james@jamespepin.com>
*/
class Horde_Constraint_And extends Horde_Constraint_Coupler
{
public function evaluate($value)
{
foreach ($this->_constraints as $c) {
if (!$c->evaluate($value)) {
return false;
}
}
return true;
}
}