Abstract Class Zend_Validate_Abstract

Description

Implements interfaces:

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

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


	
			
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
 array $_errors
 array $_messages
 Zend_Translate $_translator
 mixed $_value
Method Summary
 static Zend_Translate_Adapter|null getDefaultTranslator ()
 static void setDefaultTranslator ([Zend_Translate|Zend_Translate_Adapter|null $translator = null])
 array getErrors ()
 array getMessages ()
 bool getObscureValue ()
 Zend_Translate_Adapter|null getTranslator ()
 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 = null], [string $value = null])
 void _setValue (mixed $value)
 mixed __get (string $property)
Variables
static Zend_Translate $_defaultTranslator (line 91)

Default translation object for all validate objects

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

Array of validation failure message codes

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

Array of validation failure messages

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

Validation failure message template definitions

  • access: protected

Redefined in descendants as:
array $_messageVariables = array() (line 50)

Additional variables available for validation failure messages

  • access: protected

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

Flag indidcating whether or not value should be obfuscated in error

messages

  • access: protected
Zend_Translate $_translator (line 85)

Translation object

  • access: protected
mixed $_value (line 43)

The value to be validated

  • access: protected
Methods
static getDefaultTranslator (line 343)

Get default translation object for all validate objects

  • access: public
static Zend_Translate_Adapter|null getDefaultTranslator ()
static setDefaultTranslator (line 326)

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
getErrors (line 259)

Returns array of validation failure message codes

  • deprecated: Since 1.5.0
  • access: public
array getErrors ()

Implementation of:
Zend_Validate_Interface::getErrors()
Returns an array of message codes that explain why a previous isValid() call returned false.
getMessages (line 98)

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.
getMessageVariables (line 108)

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

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

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

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

Return translation object

  • access: public
Zend_Translate_Adapter|null getTranslator ()
setMessage (line 121)

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 142)

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 270)

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

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

Set translation object

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

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 227)
  • access: protected
void _error ([string $messageKey = null], [string $value = null])
  • string $messageKey: OPTIONAL
  • string $value: OPTIONAL
_setValue (line 246)

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

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

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, 19 Jan 2009 19:01:33 +0300 by phpDocumentor 1.4.2