Overview

Classes

  • Horde_Constraint_AlwaysFalse
  • Horde_Constraint_AlwaysTrue
  • Horde_Constraint_And
  • Horde_Constraint_Coupler
  • Horde_Constraint_IsEqual
  • Horde_Constraint_IsInstanceOf
  • Horde_Constraint_Not
  • Horde_Constraint_Null
  • Horde_Constraint_Or
  • Horde_Constraint_PregMatch

Interfaces

  • Horde_Constraint
  • Overview
  • Class
  • Tree
 1: <?php
 2: /**
 3:  * Represents a collection of constraints, if one is false, this collection will
 4:  * evaluate to false
 5:  *
 6:  * Based on PHPUnit_Framework_Constraint_And
 7:  *
 8:  * @author James Pepin <james@jamespepin.com>
 9:  */
10: class Horde_Constraint_And extends Horde_Constraint_Coupler
11: {
12:     public function evaluate($value)
13:     {
14:         foreach ($this->_constraints as $c) {
15:             if (!$c->evaluate($value)) {
16:                 return false;
17:             }
18:         }
19:         return true;
20:     }
21: }
22: 
API documentation generated by ApiGen