Methods

Countable: number of inputs in this input filter

count() : int

Only details the number of direct children.

Returns

int

Get an array of all inputs

getInputs() : array

Returns

array

Return a list of inputs that were invalid.

getInvalidInput() : \Zend\InputFilter\InputInterface[]

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

Returns

Return a list of validation failure messages

getMessages() : array

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

Returns

array

Retrieve a raw (unfiltered) value from a named input

getRawValue(string $name) : mixed

Parameters

$name

string

Exceptions

\Zend\InputFilter\Exception\InvalidArgumentException

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 the unknown input

getUnknown() : array

Return a list of inputs that were valid.

getValidInput() : \Zend\InputFilter\InputInterface[]

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

Returns

Retrieve a value from a named input

getValue(string $name) : mixed

Parameters

$name

string

Exceptions

\Zend\InputFilter\Exception\InvalidArgumentException

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) : bool

Parameters

$name

string

Returns

bool

Is the data set has unknown input ?

hasUnknown() : bool

This function is automatically called when creating element with factory.

init() : void

It allows to perform various operations (add elements...)

Is the data set valid?

isValid(mixed | null $context) : bool

Parameters

$context

mixednull

Exceptions

\Zend\InputFilter\Exception\RuntimeException

Returns

bool

Merges the inputs from an InputFilter into the current one

merge(\Zend\InputFilter\BaseInputFilter $inputFilter) : \Zend\InputFilter\self

Parameters

Returns

\Zend\InputFilter\self

Remove a named input

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

Parameters

$name

string

Returns

Replace a named input

replace(\Zend\InputFilter\InputInterface | \Zend\InputFilter\InputFilterInterface $input, string $name) : \Zend\InputFilter\self

Parameters

$name

string

Name of the input to replace

Exceptions

\Zend\InputFilter\Exception\InvalidArgumentException

Returns

\Zend\InputFilter\self

Set data to use when validating and filtering

setData(array | \Traversable $data) : \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

Exceptions

\Zend\InputFilter\Exception\InvalidArgumentException

Returns

Populate the values of all attached inputs

populate() : void

Validate a set of inputs against the current data

validateInputs(array $inputs, array $data, mixed | null $context) : bool

Parameters

$inputs

array

$data

array

$context

mixednull

Returns

bool

Ensure all names of a validation group exist as input in the filter

validateValidationGroup(array $inputs) : void

Parameters

$inputs

array

Exceptions

\Zend\InputFilter\Exception\InvalidArgumentException

 Properties

 

$data

$data : array

       

$validationGroup

$validationGroup : array

 Constants

 

VALIDATE_ALL

VALIDATE_ALL 
Inherited

inherited_from \Zend\InputFilter\InputFilterInterface::VALIDATE_ALL