NoRecordExists.php

Go to the documentation of this file.
00001 <?php
00002 
00033 class Robo47_Validate_Doctrine_NoRecordExists
00034 extends Robo47_Validate_Doctrine_Abstract
00035 {
00036     
00037     public function isValid($value)
00038     {
00039         $valid = true;
00040         $this->_setValue($value);
00041 
00042         $result = $this->_query($value);
00043         if (count($result) != 0) {
00044             $valid = false;
00045             $this->_error(self::ERROR_RECORD_FOUND);
00046         }
00047 
00048         return $valid;
00049     }
00050 }