. */ /** * Doctrine_Validator_Range * * @package Doctrine * @category Object Relational Mapping * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.phpdoctrine.com * @since 1.0 * @version $Revision$ * @author Konsta Vesterinen */ class Doctrine_Validator_Range { /** * checks if value is within given range * * @param mixed $value * @return boolean */ public function validate($value) { if (isset($this->args[0]) && $value < $this->args[0]) { return false; } if (isset($this->args[1]) && $value > $this->args[1]) { return false; } return true; } }