Interface InputFilterInterface

Summary

Fully Qualified Name: Zend\InputFilter\InputFilterInterface
Extends: Countable

Description

Methods

Name Description Defined By
add() Add an input to the input filter InputFilterInterface
get() Retrieve a named input InputFilterInterface
getInvalidInput() Return a list of inputs that were invalid. InputFilterInterface
getMessages() Return a list of validation failure messages InputFilterInterface
getRawValue() Retrieve a raw (unfiltered) value from a named input InputFilterInterface
getRawValues() Return a list of unfiltered values InputFilterInterface
getValidInput() Return a list of inputs that were valid. InputFilterInterface
getValue() Retrieve a value from a named input InputFilterInterface
getValues() Return a list of filtered values InputFilterInterface
has() Test if an input or input filter by the given name is attached InputFilterInterface
isValid() Is the data set valid? InputFilterInterface
remove() Remove a named input InputFilterInterface
setData() Set data to use when validating and filtering InputFilterInterface
setValidationGroup() Provide a list of one or more elements indicating the complete set to validate InputFilterInterface

Method Details

add()

Add an input to the input filter

Parameter Name Type Description
$input \InputInterface|\InputFilterInterface|array|\Traversable Implementations
$name null|string Name

Returns: \InputFilterInterface

get()

Retrieve a named input

Parameter Name Type Description
$name string

Returns: \InputInterface|\InputFilterInterface

getInvalidInput()

Return a list of inputs that were invalid.

Implementations should return an associative array of name/input pairs that failed validation.

Returns: \InputInterface[]

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.

Returns: string[]

getRawValue()

Retrieve a raw (unfiltered) value from a named input

Parameter Name Type Description
$name string

Returns: mixed

getRawValues()

Return a list of unfiltered values

List should be an associative array of named input/value pairs, with the values unfiltered.

Returns: array

getValidInput()

Return a list of inputs that were valid.

Implementations should return an associative array of name/input pairs that passed validation.

Returns: \InputInterface[]

getValue()

Retrieve a value from a named input

Parameter Name Type Description
$name string

Returns: mixed

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.

Returns: array

has()

Test if an input or input filter by the given name is attached

Parameter Name Type Description
$name string

Returns: bool

isValid()

Is the data set valid?

Returns: bool

remove()

Remove a named input

Parameter Name Type Description
$name string

Returns: \InputFilterInterface

setData()

Set data to use when validating and filtering

Parameter Name Type Description
$data array|\Traversable

Returns: \InputFilterInterface

setValidationGroup()

Provide a list of one or more elements indicating the complete set to validate

When provided, calls to {@link isValid()} will only validate the provided set.

If the initial value is {@link 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.

Parameter Name Type Description
$name mixed

Returns: \InputFilterInterface

Top