Abstract Class Zend_Validate_Abstract

Description

Implements interfaces:

  • copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  • abstract:
  • license: New BSD License

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


	
			
Direct descendents
Class Description
 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_Ip
Variable Summary
 static Zend_Translate $_defaultTranslator
 static Integer $_messageLength
 array $_errors
 array $_messages
 Zend_Translate $_translator
 mixed $_value
Method Summary
 static Zend_Translate_Adapter|null getDefaultTranslator ()
 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 ()
 Zend_Translate_Adapter|null getTranslator ()
 bool hasTranslator ()
 Zend_Validate_Abstract setMessage (string $messageString, [string $messageKey = null])
 Zend_Validate_Abstract setTranslator ([Zend_Translate|Zend_Translate_Adapter|null $translator = 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:
array $_messageVariables = array() (line 47)

Additional variables available for validation failure messages

  • 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])
  • Zend_Translate|Zend_Translate_Adapter|null $translator
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
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])
  • Zend_Translate|Zend_Translate_Adapter|null $translator
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 Tue, 26 Oct 2010 20:08:21 +0400 by phpDocumentor 1.4.2