Zend Framework  1.12
Public Member Functions | List of all members
Zend_Validate_Db_RecordExists Class Reference

Public Member Functions

 isValid ($value)
 Returns true if and only if $value meets the validation requirements.
 
- Public Member Functions inherited from Zend_Validate_Db_Abstract
 __construct ($options)
 Provides basic configuration for use with Zend_Validate_Db Validators Setting $exclude allows a single record to be excluded from matching.
 
 getAdapter ()
 Returns the set adapter.
 
 setAdapter ($adapter)
 Sets a new database adapter.
 
 getExclude ()
 Returns the set exclude clause.
 
 setExclude ($exclude)
 Sets a new exclude clause.
 
 getField ()
 Returns the set field.
 
 setField ($field)
 Sets a new field.
 
 getTable ()
 Returns the set table.
 
 setTable ($table)
 Sets a new table.
 
 getSchema ()
 Returns the set schema.
 
 setSchema ($schema)
 Sets a new schema.
 
 setSelect ($select)
 Sets the select object to be used by the validator.
 
 getSelect ()
 Gets the select object to be used by the validator.
 
- Public Member Functions inherited from Zend_Validate_Abstract
 getMessages ()
 Returns array of validation failure messages.
 
 getMessageVariables ()
 Returns an array of the names of variables that are used in constructing validation failure messages.
 
 getMessageTemplates ()
 Returns the message templates from the validator.
 
 setMessage ($messageString, $messageKey=null)
 Sets the validation failure message template for a particular key.
 
 setMessages (array $messages)
 Sets validation failure message templates given as an array, where the array keys are the message keys, and the array values are the message template strings.
 
 __get ($property)
 Magic function returns the value of the requested property, if and only if it is the value or a message variable.
 
 getErrors ()
 Returns array of validation failure message codes.
 
 setObscureValue ($flag)
 Set flag indicating whether or not value should be obfuscated in messages.
 
 getObscureValue ()
 Retrieve flag indicating whether or not value should be obfuscated in messages.
 
 setTranslator ($translator=null)
 Set translation object.
 
 getTranslator ()
 Return translation object.
 
 hasTranslator ()
 Does this validator have its own specific translator?
 
 setDisableTranslator ($flag)
 Indicate whether or not translation should be disabled.
 
 translatorIsDisabled ()
 Is translation disabled?
 

Additional Inherited Members

- Static Public Member Functions inherited from Zend_Validate_Abstract
static setDefaultTranslator ($translator=null)
 Set default translation object for all validate objects.
 
static getDefaultTranslator ()
 Get default translation object for all validate objects.
 
static hasDefaultTranslator ()
 Is there a default translation object set?
 
static getMessageLength ()
 Returns the maximum allowed message length.
 
static setMessageLength ($length=-1)
 Sets the maximum allowed message length.
 
- Public Attributes inherited from Zend_Validate_Db_Abstract
const ERROR_NO_RECORD_FOUND = 'noRecordFound'
 Error constants.
 
const ERROR_RECORD_FOUND = 'recordFound'
 
- Protected Member Functions inherited from Zend_Validate_Db_Abstract
 _query ($value)
 Run query and returns matches, or null if no matches are found.
 
- Protected Attributes inherited from Zend_Validate_Db_Abstract
 $_messageTemplates
 
 $_schema = null
 
 $_table = ''
 
 $_field = ''
 
 $_exclude = null
 
 $_adapter = null
 
 $_select
 
- Static Protected Attributes inherited from Zend_Validate_Abstract
static $_defaultTranslator
 
static $_messageLength = -1
 

Member Function Documentation

isValid (   $value)

Returns true if and only if $value meets the validation requirements.

If $value fails validation, then this method returns false, and getMessages() will return an array of messages that explain why the validation failed.

Parameters
mixed$value
Returns
boolean
Exceptions
Zend_Validate_ExceptionIf validation of $value is impossible

Implements Zend_Validate_Interface.