package Default
inherited_from \Zend\InputFilter\InputFilter

 Methods

Add an input to the input filter

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

Parameters

$input

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

$name

nullstring

Name used to retrieve this input

Exceptions

\Zend\InputFilter\Exception\InvalidArgumentException

Returns

\Zend\InputFilter\InputFilterInterface

Clear collectionRawValues

clearRawValues() : array<mixed,array>

Returns

array<mixed,array>

Clear collectionValues

clearValues() : array<mixed,array>

Returns

array<mixed,array>

Countable: number of inputs in this input filter

count() : integer
Inherited

Only details the number of direct children.

Returns

integer

Retrieve a named input

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

Parameters

$name

string

Exceptions

\Zend\InputFilter\Exception\InvalidArgumentException

Returns

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

Get the count of data to validate, use the count of data by default

getCount() : integer

Returns

integer

Get factory to use when adding inputs and filters by spec

getFactory() : \Zend\InputFilter\Factory
Inherited

Lazy-loads a Factory instance if none attached.

Returns

\Zend\InputFilter\Factory

Get the input filter used when looping the data

getInputFilter() : \Zend\InputFilter\BaseInputFilter

Returns

\Zend\InputFilter\BaseInputFilter

Get an array of all inputs

getInputs() : array<mixed,\Zend\InputFilter\InputInterface> | array<mixed,\Zend\InputFilter\InputFilterInterface>
Inherited

Returns

array<mixed,\Zend\InputFilter\InputInterface>array<mixed,\Zend\InputFilter\InputFilterInterface>

Return a list of inputs that were invalid.

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

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

inherited_from \Zend\InputFilter\InputFilterInterface::getInvalidInput()

Returns

array<mixed,\Zend\InputFilter\InputInterface>

Get if collection can be empty

getIsRequired() : boolean

Returns

boolean

{@inheritdoc}

getMessages() 

Return a list of validation failure messages

getMessages() : array
Inherited

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

inherited_from \Zend\InputFilter\InputFilterInterface::getMessages()

Returns

array

Retrieve a raw (unfiltered) value from a named input

getRawValue(string $name) : mixed
Inherited
inherited_from \Zend\InputFilter\InputFilterInterface::getRawValue()

Parameters

$name

string

Exceptions

\Zend\InputFilter\Exception\InvalidArgumentException

Returns

mixed

{@inheritdoc}

getRawValues() 

Return a list of unfiltered values

getRawValues() : array
Inherited

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

inherited_from \Zend\InputFilter\InputFilterInterface::getRawValues()

Returns

array

Return the unknown input

getUnknown() : array
Inherited
inherited_from \Zend\InputFilter\UnknownInputsCapableInterface::getUnknown()

Exceptions

\Zend\InputFilter\Exception\RuntimeException

Returns

array

Return a list of inputs that were valid.

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

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

inherited_from \Zend\InputFilter\InputFilterInterface::getValidInput()

Returns

array<mixed,\Zend\InputFilter\InputInterface>

Retrieve a value from a named input

getValue(string $name) : mixed
Inherited
inherited_from \Zend\InputFilter\InputFilterInterface::getValue()

Parameters

$name

string

Exceptions

\Zend\InputFilter\Exception\InvalidArgumentException

Returns

mixed

{@inheritdoc}

getValues() 

Return a list of filtered values

getValues() : array
Inherited

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

inherited_from \Zend\InputFilter\InputFilterInterface::getValues()

Returns

array

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

has(string $name) : boolean
Inherited
inherited_from \Zend\InputFilter\InputFilterInterface::has()

Parameters

$name

string

Returns

boolean

Is the data set has unknown input ?

hasUnknown() : boolean
Inherited
inherited_from \Zend\InputFilter\UnknownInputsCapableInterface::hasUnknown()

Exceptions

\Zend\InputFilter\Exception\RuntimeException

Returns

boolean

This function is automatically called when creating element with factory. It allows to perform various operations (add elements.

init() : void
Inherited

..)

inherited_from \Zend\Stdlib\InitializableInterface::init()

{@inheritdoc}

isValid() 

Is the data set valid?

isValid(mixed|null $context = null) : boolean
Inherited
inherited_from \Zend\InputFilter\InputFilterInterface::isValid()

Parameters

$context

mixednull

Exceptions

\Zend\InputFilter\Exception\RuntimeException

Returns

boolean

Merges the inputs from an InputFilter into the current one

merge(\Zend\InputFilter\BaseInputFilter $inputFilter) : \Zend\InputFilter\CollectionInputFilter
Inherited
fluent This method is part of a fluent interface and will return the same instance

Parameters

$inputFilter

\Zend\InputFilter\BaseInputFilter

Returns

\Zend\InputFilter\CollectionInputFilter

Remove a named input

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

Parameters

$name

string

Returns

\Zend\InputFilter\InputFilterInterface

Replace a named input

replace(mixed $input, string $name) : \Zend\InputFilter\CollectionInputFilter
Inherited
inherited_from \Zend\InputFilter\ReplaceableInputInterface::replace()
fluent This method is part of a fluent interface and will return the same instance

Parameters

$input

mixed

Any of the input types allowed on add() method.

$name

string

Name of the input to replace

Exceptions

\Zend\InputFilter\Exception\InvalidArgumentException If input to replace not exists.

Returns

\Zend\InputFilter\CollectionInputFilter

Set the count of data to validate

setCount(integer $count) : \Zend\InputFilter\CollectionInputFilter

Parameters

$count

integer

Returns

\Zend\InputFilter\CollectionInputFilter

{@inheritdoc}

setData($data) 

Parameters

$data

Set data to use when validating and filtering

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

Parameters

$data

array\Traversable

Exceptions

\Zend\InputFilter\Exception\InvalidArgumentException

Returns

\Zend\InputFilter\InputFilterInterface

Set factory to use when adding inputs and filters by spec

setFactory(\Zend\InputFilter\Factory $factory) : \Zend\InputFilter\InputFilter
Inherited

Parameters

$factory

\Zend\InputFilter\Factory

Returns

\Zend\InputFilter\InputFilter

Set the input filter to use when looping the data

setInputFilter(\Zend\InputFilter\BaseInputFilter|array|\Traversable $inputFilter) : \Zend\InputFilter\CollectionInputFilter

Parameters

$inputFilter

\Zend\InputFilter\BaseInputFilterarray\Traversable

Exceptions

\Zend\InputFilter\Exception\RuntimeException

Returns

\Zend\InputFilter\CollectionInputFilter

Set if the collection can be empty

setIsRequired(boolean $isRequired) : \Zend\InputFilter\CollectionInputFilter

Parameters

$isRequired

boolean

Returns

\Zend\InputFilter\CollectionInputFilter

{@inheritdoc}

setValidationGroup($name) 

Parameters

$name

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

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

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.

inherited_from \Zend\InputFilter\InputFilterInterface::setValidationGroup()

Parameters

$name

mixed

Exceptions

\Zend\InputFilter\Exception\InvalidArgumentException

Returns

\Zend\InputFilter\InputFilterInterface

Populate the values of all attached inputs

populate() : void
Inherited

Validate a set of inputs against the current data

validateInputs(array<mixed,string> $inputs, array|\ArrayAccess $data = array(), mixed|null $context = null) : boolean
Inherited

Parameters

$inputs

array<mixed,string>

Array of input names.

$data

array\ArrayAccess

$context

mixednull

Returns

boolean

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

validateValidationGroup(array<mixed,string> $inputs) : void
Inherited

Parameters

$inputs

array<mixed,string>

Input names

Exceptions

\Zend\InputFilter\Exception\InvalidArgumentException

 Properties

 

$collectionMessages

$collectionMessages : array

Default

array()
 

$collectionRawValues

$collectionRawValues : array<mixed,array>

Default

array()
 

$collectionValues

$collectionValues : array<mixed,array>

Default

array()
 

$count

$count : integer

Default

null
 

$data

$data : null | array

Default

 

$factory

$factory : \Zend\InputFilter\Factory

Default

 

$inputFilter

$inputFilter : \Zend\InputFilter\BaseInputFilter

Default

 

$inputs

$inputs : array<mixed,\Zend\InputFilter\InputInterface> | array<mixed,\Zend\InputFilter\InputFilterInterface>

Default

array()
 

$invalidInputs

$invalidInputs : array<mixed,\Zend\InputFilter\InputInterface> | array<mixed,\Zend\InputFilter\InputFilterInterface>

Default

 

$isRequired

$isRequired : boolean

Default

false
 

$validInputs

$validInputs : array<mixed,\Zend\InputFilter\InputInterface> | array<mixed,\Zend\InputFilter\InputFilterInterface>

Default

 

Input names

$validationGroup : null | array<mixed,string>

Default