Public Member Functions | |
getMessages () | |
getMessageVariables () | |
getMessageTemplates () | |
setMessage ($messageString, $messageKey=null) | |
setMessages (array $messages) | |
__get ($property) | |
getErrors () | |
setObscureValue ($flag) | |
getObscureValue () | |
setTranslator ($translator=null) | |
getTranslator () | |
setDisableTranslator ($flag) | |
translatorIsDisabled () | |
Static Public Member Functions | |
static | setDefaultTranslator ($translator=null) |
static | getDefaultTranslator () |
static | getMessageLength () |
static | setMessageLength ($length=-1) |
Protected Member Functions | |
_createMessage ($messageKey, $value) | |
_error ($messageKey=null, $value=null) | |
_setValue ($value) | |
Protected Attributes | |
$_value | |
$_messageVariables = array() | |
$_messageTemplates = array() | |
$_messages = array() | |
$_obscureValue = false | |
$_errors = array() | |
$_translator | |
$_translatorDisabled = false | |
Static Protected Attributes | |
static | $_defaultTranslator |
static | $_messageLength = -1 |
Definition at line 33 of file Abstract.php.
__get | ( | $ | property ) |
Magic function returns the value of the requested property, if and only if it is the value or a message variable.
string | $property |
Zend_Validate_Exception |
Definition at line 183 of file Abstract.php.
_createMessage | ( | $ | messageKey, |
$ | value | ||
) | [protected] |
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.
string | $messageKey | |
string | $value |
Definition at line 210 of file Abstract.php.
_error | ( | $ | messageKey = null , |
$ | value = null |
||
) | [protected] |
string | $messageKey | OPTIONAL |
string | $value | OPTIONAL |
Definition at line 258 of file Abstract.php.
_setValue | ( | $ | value ) | [protected] |
Sets the value to be validated and clears the messages and errors arrays
mixed | $value |
Definition at line 277 of file Abstract.php.
static getDefaultTranslator | ( | ) | [static] |
Get default translation object for all validate objects
Definition at line 378 of file Abstract.php.
getErrors | ( | ) |
Returns array of validation failure message codes
Implements Zend_Validate_Interface.
Definition at line 290 of file Abstract.php.
static getMessageLength | ( | ) | [static] |
Returns the maximum allowed message length
Definition at line 422 of file Abstract.php.
getMessages | ( | ) |
Returns array of validation failure messages
Implements Zend_Validate_Interface.
Definition at line 108 of file Abstract.php.
getMessageTemplates | ( | ) |
Returns the message templates from the validator
Definition at line 128 of file Abstract.php.
getMessageVariables | ( | ) |
Returns an array of the names of variables that are used in constructing validation failure messages
Definition at line 118 of file Abstract.php.
getObscureValue | ( | ) |
Retrieve flag indicating whether or not value should be obfuscated in messages
Definition at line 313 of file Abstract.php.
getTranslator | ( | ) |
Return translation object
Definition at line 342 of file Abstract.php.
static setDefaultTranslator | ( | $ | translator = null ) |
[static] |
Set default translation object for all validate objects
Zend_Translate | Zend_Translate_Adapter | null | $translator |
Definition at line 361 of file Abstract.php.
setDisableTranslator | ( | $ | flag ) |
Indicate whether or not translation should be disabled
bool | $flag |
Definition at line 401 of file Abstract.php.
setMessage | ( | $ | messageString, |
$ | messageKey = null |
||
) |
Sets the validation failure message template for a particular key
string | $messageString | |
string | $messageKey | OPTIONAL |
Zend_Validate_Exception |
Definition at line 141 of file Abstract.php.
static setMessageLength | ( | $ | length = -1 ) |
[static] |
Sets the maximum allowed message length
integer | $length |
Definition at line 432 of file Abstract.php.
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.
array | $messages |
Definition at line 167 of file Abstract.php.
setObscureValue | ( | $ | flag ) |
Set flag indicating whether or not value should be obfuscated in messages
bool | $flag |
Definition at line 301 of file Abstract.php.
setTranslator | ( | $ | translator = null ) |
Set translation object
Zend_Translate | Zend_Translate_Adapter | null | $translator |
Definition at line 324 of file Abstract.php.
translatorIsDisabled | ( | ) |