Validate/Abstract.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Validate
- Version
- $Id$
\Zend_Validate_Abstract
Package: Zend_Validate- Implements
- Children
- \Zend_Validate_Ip
- \Zend_Validate_Hostname
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties



array $_errors = array()Array of validation failure message codes
Default valuearray()Details- Type
- array
- Deprecated
- Since 1.5.0



Integer $_messageLength = -1staticLimits the maximum returned length of a error message
Default value-1Details- Type
- Integer



array $_messageTemplates = array()Validation failure message template definitions
Default valuearray()Details- Type
- array



array $_messageVariables = array()Additional variables available for validation failure messages
Default valuearray()Details- Type
- array



array $_messages = array()Array of validation failure messages
Default valuearray()Details- Type
- array



bool $_obscureValue = falseFlag indidcating whether or not value should be obfuscated in error
messages
Default valuefalseDetails- Type
- bool
Methods



__get(string $property) : mixedMagic function returns the value of the requested property, if and only if it is the value or a
message variable.
Parameters| Name | Type | Description |
|---|
| $property | string | |
|---|
ReturnsThrows 


_createMessage(string $messageKey, string $value) : stringConstructs 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.
Parameters| Name | Type | Description |
|---|
| $messageKey | string | |
|---|
| $value | string | |
|---|
Returns


_error(string $messageKey, string $value = null) : voidParameters| Name | Type | Description |
|---|
| $messageKey | string | |
|---|
| $value | string | OPTIONAL |
|---|



_setValue(mixed $value) : voidSets the value to be validated and clears the messages and errors arrays
Parameters| Name | Type | Description |
|---|
| $value | mixed | |
|---|



getErrors() : arrayReturns array of validation failure message codes
ReturnsDetails- Deprecated
- Since 1.5.0



setDisableTranslator(bool $flag) : \Zend_Validate_AbstractIndicate whether or not translation should be disabled
Parameters| Name | Type | Description |
|---|
| $flag | bool | |
|---|
Returns 


setMessage(string $messageString, string $messageKey = null) : \Zend_Validate_AbstractSets the validation failure message template for a particular key
Parameters| Name | Type | Description |
|---|
| $messageString | string | |
|---|
| $messageKey | string | OPTIONAL |
|---|
ReturnsThrows 


setMessageLength(integer $length = -1) : voidstaticSets the maximum allowed message length
Parameters| Name | Type | Description |
|---|
| $length | integer | |
|---|



setMessages(array $messages) : \Zend_Validate_AbstractSets 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.
Parameters| Name | Type | Description |
|---|
| $messages | array | |
|---|
Returns 


setObscureValue(bool $flag) : \Zend_Validate_AbstractSet flag indicating whether or not value should be obfuscated in messages
Parameters| Name | Type | Description |
|---|
| $flag | bool | |
|---|
Returns