Filter/Input.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_Filter
- Version
- $Id$
Package: Zend_Filter- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
Properties
array $_data = array()
Input data, before processing.
Default valuearray()
Details- Type
- array
array $_defaults = array(self::ALLOW_EMPTY => false, self::BREAK_CHAIN => false, self::ESCAPE_FILTER => 'HtmlEntities', self::MISSING_MESSAGE => "Field '%field%' is required by rule '%rule%', but the field is missing", self::NOT_EMPTY_MESSAGE => "You must give a non-empty value for field '%field%'", self::PRESENCE => self::PRESENCE_OPTIONAL)
Default values to use when processing filters and validators.
Default valuearray(self::ALLOW_EMPTY => false, self::BREAK_CHAIN => false, self::ESCAPE_FILTER => 'HtmlEntities', self::MISSING_MESSAGE => "Field '%field%' is required by rule '%rule%', but the field is missing", self::NOT_EMPTY_MESSAGE => "You must give a non-empty value for field '%field%'", self::PRESENCE => self::PRESENCE_OPTIONAL)
Details- Type
- array
array $_filterRules = array()
Association of rules to filters.
Default valuearray()
Details- Type
- array
array $_invalidErrors = array()
After processing data, this contains mapping of validation
rules that did not pass validation to the array of error identifiers
returned by the validator chain.
Default valuearray()
Details- Type
- array
array $_invalidMessages = array()
After processing data, this contains mapping of validation
rules that did not pass validation to the array of messages returned
by the validator chain.
Default valuearray()
Details- Type
- array
array $_missingFields = array()
After processing data, this contains mapping of validation
rules in which some fields were missing to the array of messages
indicating which fields were missing.
Default valuearray()
Details- Type
- array
boolean $_processed = false
Set to False initially, this is set to True after the
input data have been processed. Reset to False in setData() method.
Default valuefalse
Details- Type
- boolean
array $_unknownFields = array()
After processing, this contains a copy of $_data elements
that were not mentioned in any validation rule.
Default valuearray()
Details- Type
- array
array $_validFields = array()
After processing data, this contains mapping of valid fields
to field values.
Default valuearray()
Details- Type
- array
array $_validatorRules = array()
Association of rules to validators.
Default valuearray()
Details- Type
- array
Methods
__construct(array $filterRules, array $validatorRules, array $data = null, array $options = null) : void
ParametersName | Type | Description |
---|
$filterRules | array | |
---|
$validatorRules | array | |
---|
$data | array | OPTIONAL |
---|
$options | array | OPTIONAL |
---|
_getNotEmptyValidatorInstance(array $validatorRule) : mixed
Check a validatorRule for the presence of a NotEmpty validator instance.
The purpose is to preserve things like a custom message, that may have been
set on the validator outside Zend_Filter_Input.
ParametersName | Type | Description |
---|
$validatorRule | array | |
---|
ReturnsType | Description |
---|
mixed | false if none is found, Zend_Validate_NotEmpty instance if found |
addFilterPrefixPath(string $prefix, string $path) : \Zend_Filter_Input
Add prefix path for all elements
ParametersName | Type | Description |
---|
$prefix | string | |
---|
$path | string | |
---|
Returns addValidatorPrefixPath(string $prefix, string $path) : \Zend_Filter_Input
Add prefix path for all elements
ParametersName | Type | Description |
---|
$prefix | string | |
---|
$path | string | |
---|
Returns getEscaped(string $fieldName = null) : mixed
ParametersName | Type | Description |
---|
$fieldName | string | OPTIONAL |
---|
Returns getPluginLoader(string $type) : \Zend_Loader_PluginLoader_Interface
Retrieve plugin loader for given type
$type may be one of:
- filter
- validator
If a plugin loader does not exist for the given type, defaults are
created.
ParametersName | Type | Description |
---|
$type | string | 'filter' or 'validate' |
---|
ReturnsThrowsgetUnescaped(string $fieldName = null) : mixed
ParametersName | Type | Description |
---|
$fieldName | string | OPTIONAL |
---|
Returns setDisableTranslator(bool $flag) : \Zend_Filter_Input
Indicate whether or not translation should be disabled
ParametersName | Type | Description |
---|
$flag | bool | |
---|
Returns