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:  * Checks for an instance of a class
 4:  *
 5:  * Based on PHPUnit_Framework_Constraint_IsInstanceOf
 6:  *
 7:  * @author James Pepin <james@jamespepin.com>
 8:  */
 9: class Horde_Constraint_IsInstanceOf implements Horde_Constraint
10: {
11:     private $_type;
12: 
13:     public function __construct($type)
14:     {
15:         $this->_type = $type;
16:     }
17: 
18:     public function evaluate($value)
19:     {
20:         return $value instanceof $this->_type;
21:     }
22: }
23: 
API documentation generated by ApiGen