Zend Framework
3.0
|
Public Member Functions | |
add ($input, $name=null) | |
Add an input to the input filter. | |
get ($name) | |
Retrieve a named input. | |
has ($name) | |
Test if an input or input filter by the given name is attached. | |
remove ($name) | |
Remove a named input. | |
setData ($data) | |
Set data to use when validating and filtering. | |
isValid () | |
Is the data set valid? | |
setValidationGroup ($name) | |
Provide a list of one or more elements indicating the complete set to validate. | |
getInvalidInput () | |
Return a list of inputs that were invalid. | |
getValidInput () | |
Return a list of inputs that were valid. | |
getValue ($name) | |
Retrieve a value from a named input. | |
getValues () | |
Return a list of filtered values. | |
getRawValue ($name) | |
Retrieve a raw (unfiltered) value from a named input. | |
getRawValues () | |
Return a list of unfiltered values. | |
getMessages () | |
Return a list of validation failure messages. | |
Public Attributes | |
const | VALIDATE_ALL = 'INPUT_FILTER_ALL' |
add | ( | $input, | |
$name = null |
|||
) |
Add an input to the input filter.
InputInterface | InputFilterInterface | array | Traversable | $input | Implementations MUST handle at least one of the specified types, and raise an exception for any they cannot process. |
null | string | $name | Name used to retrieve this input |
Exception\InvalidArgumentException | if unable to handle the input type. |
Implemented in BaseInputFilter, and InputFilter.
get | ( | $name | ) |
Retrieve a named input.
string | $name |
Implemented in BaseInputFilter.
getInvalidInput | ( | ) |
Return a list of inputs that were invalid.
Implementations should return an associative array of name/input pairs that failed validation.
Implemented in BaseInputFilter.
getMessages | ( | ) |
Return a list of validation failure messages.
Should return an associative array of named input/message list pairs. Pairs should only be returned for inputs that failed validation.
Implemented in BaseInputFilter, and CollectionInputFilter.
getRawValue | ( | $name | ) |
Retrieve a raw (unfiltered) value from a named input.
string | $name |
Implemented in BaseInputFilter.
getRawValues | ( | ) |
Return a list of unfiltered values.
List should be an associative array of named input/value pairs, with the values unfiltered.
Implemented in BaseInputFilter, and CollectionInputFilter.
getValidInput | ( | ) |
Return a list of inputs that were valid.
Implementations should return an associative array of name/input pairs that passed validation.
Implemented in BaseInputFilter.
getValue | ( | $name | ) |
Retrieve a value from a named input.
string | $name |
Implemented in BaseInputFilter.
getValues | ( | ) |
Return a list of filtered values.
List should be an associative array, with the values filtered. If validation failed, this should raise an exception.
Implemented in BaseInputFilter, and CollectionInputFilter.
has | ( | $name | ) |
Test if an input or input filter by the given name is attached.
string | $name |
Implemented in BaseInputFilter.
isValid | ( | ) |
remove | ( | $name | ) |
Remove a named input.
string | $name |
Implemented in BaseInputFilter.
setData | ( | $data | ) |
Set data to use when validating and filtering.
array | Traversable | $data |
Implemented in BaseInputFilter, and CollectionInputFilter.
setValidationGroup | ( | $name | ) |
Provide a list of one or more elements indicating the complete set to validate.
When provided, calls to isValid() will only validate the provided set.
If the initial value is VALIDATE_ALL, the current validation group, if any, should be cleared.
Implementations should allow passing a single array value, or multiple arguments, each specifying a single input.
mixed | $name |
Implemented in BaseInputFilter, and CollectionInputFilter.
const VALIDATE_ALL = 'INPUT_FILTER_ALL' |