. */ /** * Doctrine_Validator_Range * * @package Doctrine * @subpackage Validator * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.phpdoctrine.org * @since 1.0 * @version $Revision: 3882 $ * @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; } }