1: <?php
 2: /**
 3:  * Negates another constraint
 4:  *
 5:  * Based on PHPUnit_Framework_Constraint_Not
 6:  *
 7:  * @author James Pepin <james@jamespepin.com>
 8:  */
 9: class Horde_Constraint_Not implements Horde_Constraint
10: {
11:     private $_constraint;
12: 
13:     public function __construct(Horde_Constraint $constraint)
14:     {
15:         $this->_constraint = $constraint;
16:     }
17: 
18:     public function evaluate($value)
19:     {
20:         return !$this->_constraint->evaluate($value);
21:     }
22: }
23: