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 = -1
staticLimits the maximum returned length of a error message
Default value-1
Details- 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 = false
Flag indidcating whether or not value should be obfuscated in error
messages
Default valuefalse
Details- Type
- bool
Methods



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


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


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



_setValue(mixed $value) : void
Sets the value to be validated and clears the messages and errors arrays
ParametersName | Type | Description |
---|
$value | mixed | |
---|



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



setDisableTranslator(bool $flag) : \Zend_Validate_Abstract
Indicate whether or not translation should be disabled
ParametersName | Type | Description |
---|
$flag | bool | |
---|
Returns 


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


setMessageLength(integer $length = -1) : void
staticSets the maximum allowed message length
ParametersName | Type | Description |
---|
$length | integer | |
---|



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


setObscureValue(bool $flag) : \Zend_Validate_Abstract
Set flag indicating whether or not value should be obfuscated in messages
ParametersName | Type | Description |
---|
$flag | bool | |
---|
Returns