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

23 lines
424 B
PHP

<?php
/**
* Checks for an instance of a class
*
* Based on PHPUnit_Framework_Constraint_IsInstanceOf
*
* @author James Pepin <james@jamespepin.com>
*/
class Horde_Constraint_IsInstanceOf implements Horde_Constraint
{
private $_type;
public function __construct($type)
{
$this->_type = $type;
}
public function evaluate($value)
{
return $value instanceof $this->_type;
}
}