Public Member Functions | |
__construct ($table, $field, $exclude=null, Zend_Db_Adapter_Abstract $adapter=null) | |
Data Fields | |
const | ERROR_NO_RECORD_FOUND = 'noRecordFound' |
const | ERROR_RECORD_FOUND = 'recordFound' |
Protected Member Functions | |
_query ($value) | |
Protected Attributes | |
$_messageTemplates | |
$_schema = null | |
$_table = '' | |
$_field = '' | |
$_exclude = null | |
$_adapter = null |
Definition at line 37 of file Abstract.php.
__construct | ( | $ | table, |
$ | field, | ||
$ | exclude = null , |
||
Zend_Db_Adapter_Abstract $ | adapter = null |
||
) |
Provides basic configuration for use with Zend_Validate_Db Validators Setting $exclude allows a single record to be excluded from matching. Exclude can either be a String containing a where clause, or an array with `field` and `value` keys to define the where clause added to the sql. A database adapter may optionally be supplied to avoid using the registered default adapter.
string||array | $table The database table to validate against, or array with table and schema keys | |
string | $field | The field to check for a match |
string||array | $exclude An optional where clause or field/value pair to exclude from the query | |
Zend_Db_Adapter_Abstract | $adapter | An optional database adapter to use. |
Definition at line 90 of file Abstract.php.
_query | ( | $ | value ) | [protected] |
Run query and returns matches, or null if no matches are found.
String | $value |
Check for an adapter being defined. if not, fetch the default adapter.
Build select object
Run query
Definition at line 113 of file Abstract.php.
$_messageTemplates [protected] |
array(self::ERROR_NO_RECORD_FOUND => 'No record matching %value% was found', self::ERROR_RECORD_FOUND => 'A record matching %value% was found')
Reimplemented from Zend_Validate_Abstract.
Definition at line 48 of file Abstract.php.
const ERROR_NO_RECORD_FOUND = 'noRecordFound' |
Error constants
Definition at line 42 of file Abstract.php.