package Default

 Methods

Add an input to the input filter

add(\Zend\InputFilter\InputInterface|\Zend\InputFilter\InputFilterInterface|array|\Traversable $input, null|string $name = null) : \Zend\InputFilter\InputFilterInterface

Parameters

$input

\Zend\InputFilter\InputInterface\Zend\InputFilter\InputFilterInterfacearray\Traversable

Implementations MUST handle at least one of the specified types, and raise an exception for any they cannot process.

$name

nullstring

Name used to retrieve this input

Exceptions

\Zend\InputFilter\Exception\InvalidArgumentException if unable to handle the input type.

Returns

\Zend\InputFilter\InputFilterInterface

Retrieve a named input

get(string $name) : \Zend\InputFilter\InputInterface | \Zend\InputFilter\InputFilterInterface

Parameters

$name

string

Returns

\Zend\InputFilter\InputInterface\Zend\InputFilter\InputFilterInterface

Return a list of inputs that were invalid.

getInvalidInput() : array<mixed,\Zend\InputFilter\InputInterface>

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

Returns

array<mixed,\Zend\InputFilter\InputInterface>

Return a list of validation failure messages

getMessages() : array<mixed,string>

Should return an associative array of named input/message list pairs. Pairs should only be returned for inputs that failed validation.

Returns

array<mixed,string>

Retrieve a raw (unfiltered) value from a named input

getRawValue(string $name) : mixed

Parameters

$name

string

Returns

mixed

Return a list of unfiltered values

getRawValues() : array

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

Returns

array

Return a list of inputs that were valid.

getValidInput() : array<mixed,\Zend\InputFilter\InputInterface>

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

Returns

array<mixed,\Zend\InputFilter\InputInterface>

Retrieve a value from a named input

getValue(string $name) : mixed

Parameters

$name

string

Returns

mixed

Return a list of filtered values

getValues() : array

List should be an associative array, with the values filtered. If validation failed, this should raise an exception.

Returns

array

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

has(string $name) : boolean

Parameters

$name

string

Returns

boolean

Is the data set valid?

isValid() : boolean

Returns

boolean

Remove a named input

remove(string $name) : \Zend\InputFilter\InputFilterInterface

Parameters

$name

string

Returns

\Zend\InputFilter\InputFilterInterface

Set data to use when validating and filtering

setData(array|\Traversable $data) : \Zend\InputFilter\InputFilterInterface

Parameters

$data

array\Traversable

Returns

\Zend\InputFilter\InputFilterInterface

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

setValidationGroup(mixed $name) : \Zend\InputFilter\InputFilterInterface

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.

Parameters

$name

mixed

Returns

\Zend\InputFilter\InputFilterInterface

 Constants

 

VALIDATE_ALL

VALIDATE_ALL = 'INPUT_FILTER_ALL'