Abstract Class Zend_Validate_Abstract

Description

Implements interfaces:

Located in /Validate/Abstract.php (line 33)


	
			
Direct descendents
Class Description
 class Zend_Validate_Ccnum
 class Zend_Validate_Callback
Abstract class Zend_Validate_Db_Abstract Class for Database record validation
 class Zend_Validate_Hostname Please note there are two standalone test scripts for testing IDN characters due to problems with file encoding.
 class Zend_Validate_Iban Validates IBAN Numbers (International Bank Account Numbers)
 class Zend_Validate_Int
 class Zend_Validate_Alnum
 class Zend_Validate_EmailAddress
 class Zend_Validate_File_Hash Validator for the hash of given files
 class Zend_Validate_File_Count Validator for counting all given files
 class Zend_Validate_File_ImageSize Validator for the image size of a image file
 class Zend_Validate_File_Extension Validator for the file extension of a file
 class Zend_Validate_File_MimeType Validator for the mime type of a file
 class Zend_Validate_File_Size Validator for the maximum size of a file up to a max of 2GB
 class Zend_Validate_File_Upload Validator for the maximum size of a file up to a max of 2GB
 class Zend_Validate_File_Exists Validator which checks if the file already exists in the directory
 class Zend_Validate_StringLength
 class Zend_Validate_Barcode
 class Zend_Validate_PostCode
 class Zend_Validate_CreditCard
 class Zend_Validate_Sitemap_Changefreq Validates whether a given value is valid as a sitemap <changefreq> value
 class Zend_Validate_Sitemap_Lastmod Validates whether a given value is valid as a sitemap <lastmod> value
 class Zend_Validate_Sitemap_Loc Validates whether a given value is valid as a sitemap <loc> value
 class Zend_Validate_Sitemap_Priority Validates whether a given value is valid as a sitemap <priority> value
 class Zend_Validate_Isbn
 class Zend_Validate_Identical
 class Zend_Validate_Date
 class Zend_Validate_LessThan
 class Zend_Validate_Regex
 class Zend_Validate_GreaterThan
 class Zend_Validate_Float
 class Zend_Validate_Hex
 class Zend_Validate_InArray
 class Zend_Validate_Between
 class Zend_Validate_Alpha
 class Zend_Validate_Digits
 class Zend_Validate_Ip
 class Zend_Validate_NotEmpty
Abstract class Zend_Captcha_Base Base class for Captcha adapters
Variable Summary
Method Summary
 static integer getMessageLength ()
 static boolean hasDefaultTranslator ()
 static void setDefaultTranslator ([Zend_Translate|Zend_Translate_Adapter|null $translator = null])
 static void setMessageLength ([integer $length = -1])
 array getErrors ()
 array getMessages ()
 bool getObscureValue ()
 bool hasTranslator ()
 Zend_Validate_Abstract setMessage (string $messageString, [string $messageKey = null])
 string _createMessage (string $messageKey, string $value)
 void _error (string $messageKey, [string $value = null])
 void _setValue (mixed $value)
 mixed __get (string $property)
Variables
static Zend_Translate $_defaultTranslator (line 88)

Default translation object for all validate objects

  • access: protected
static Integer $_messageLength = -1 (line 101)

Limits the maximum returned length of a error message

  • access: protected
array $_errors = array() (line 76)

Array of validation failure message codes

  • deprecated: Since 1.5.0
  • access: protected
array $_messages = array() (line 61)

Array of validation failure messages

  • access: protected
array $_messageTemplates = array() (line 54)

Validation failure message template definitions

  • access: protected

Redefined in descendants as:
bool $_obscureValue = false (line 68)

Flag indidcating whether or not value should be obfuscated in error

messages

  • access: protected
Zend_Translate $_translator (line 82)

Translation object

  • access: protected
Boolean $_translatorDisabled = false (line 94)

Is translation disabled?

  • access: protected
mixed $_value (line 40)

The value to be validated

  • access: protected
Methods
static getDefaultTranslator (line 388)

Get default translation object for all validate objects

  • access: public
static Zend_Translate_Adapter|null getDefaultTranslator ()
static getMessageLength (line 442)

Returns the maximum allowed message length

  • access: public
static integer getMessageLength ()
static hasDefaultTranslator (line 410)

Is there a default translation object set?

  • access: public
static boolean hasDefaultTranslator ()
static setDefaultTranslator (line 371)

Set default translation object for all validate objects

  • access: public
static void setDefaultTranslator ([Zend_Translate|Zend_Translate_Adapter|null $translator = null])
static setMessageLength (line 452)

Sets the maximum allowed message length

  • access: public
static void setMessageLength ([integer $length = -1])
  • integer $length
getErrors (line 290)

Returns array of validation failure message codes

  • deprecated: Since 1.5.0
  • access: public
array getErrors ()
getMessages (line 108)

Returns array of validation failure messages

  • access: public
array getMessages ()

Implementation of:
Zend_Validate_Interface::getMessages()
Returns an array of messages that explain why the most recent isValid() call returned false. The array keys are validation failure message identifiers, and the array values are the corresponding human-readable message strings.
getMessageTemplates (line 128)

Returns the message templates from the validator

  • access: public
array getMessageTemplates ()
getMessageVariables (line 118)

Returns an array of the names of variables that are used in constructing validation failure messages

  • access: public
array getMessageVariables ()
getObscureValue (line 313)

Retrieve flag indicating whether or not value should be obfuscated in messages

  • access: public
bool getObscureValue ()
getTranslator (line 342)

Return translation object

  • access: public
Zend_Translate_Adapter|null getTranslator ()
hasTranslator (line 360)

Does this validator have its own specific translator?

  • access: public
bool hasTranslator ()
setDisableTranslator (line 421)

Indicate whether or not translation should be disabled

  • access: public
Zend_Validate_Abstract setDisableTranslator (bool $flag)
  • bool $flag
setMessage (line 141)

Sets the validation failure message template for a particular key

  • return: Provides a fluent interface
  • throws: Zend_Validate_Exception
  • access: public
Zend_Validate_Abstract setMessage (string $messageString, [string $messageKey = null])
  • string $messageString
  • string $messageKey: OPTIONAL

Redefined in descendants as:
setMessages (line 167)

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.

  • access: public
Zend_Validate_Abstract setMessages ( $messages)
  • array $messages
setObscureValue (line 301)

Set flag indicating whether or not value should be obfuscated in messages

  • access: public
Zend_Validate_Abstract setObscureValue (bool $flag)
  • bool $flag
setTranslator (line 324)

Set translation object

  • access: public
Zend_Validate_Abstract setTranslator ([Zend_Translate|Zend_Translate_Adapter|null $translator = null])
translatorIsDisabled (line 432)

Is translation disabled?

  • access: public
bool translatorIsDisabled ()
_createMessage (line 210)

Constructs and returns a validation failure message with the given message key and value.

Returns null if and only if $messageKey does not correspond to an existing template.

If a translator is available and a translation exists for $messageKey, the translation will be used.

  • access: protected
string _createMessage (string $messageKey, string $value)
  • string $messageKey
  • string $value
_error (line 258)
  • access: protected
void _error (string $messageKey, [string $value = null])
  • string $messageKey
  • string $value: OPTIONAL
_setValue (line 277)

Sets the value to be validated and clears the messages and errors arrays

  • access: protected
void _setValue (mixed $value)
  • mixed $value
__get (line 183)

Magic function returns the value of the requested property, if and only if it is the value or a message variable.

  • throws: Zend_Validate_Exception
  • access: public
mixed __get (string $property)
  • string $property

Documentation generated on Mon, 21 Jun 2010 15:05:34 -0400 by phpDocumentor 1.4.3