Пример #1
0
 /**
  * Defined by Zend_Validate_Interface
  *
  * Returns true if and only if $value is unique in DB
  *
  * @param  string $value
  * @return boolean
  */
 public function isValid($value)
 {
     $result = !parent::isValid($value);
     $this->_errors = array();
     $this->_messages = array();
     if ($result) {
         return true;
     }
     $this->_error();
     return false;
 }
Пример #2
0
 public function __construct($table, $column, $pkColumn = null, $pkValue = null, $adapter = null)
 {
     $this->setPkColumn($pkColumn)->setPkValue($pkValue);
     parent::__construct($table, $column, $adapter);
 }