package Default
inherited_from \Zend\InputFilter\BaseInputFilter

 Methods

Add an input to the input filter

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

Parameters

$input

array\Traversable\Zend\InputFilter\InputInterface\Zend\InputFilter\InputFilterInterface

$name

nullstring

Returns

\Zend\InputFilter\InputFilter

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

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 factory to use when adding inputs and filters by spec

getFactory() : \Zend\InputFilter\Factory

Lazy-loads a Factory instance if none attached.

Returns

\Zend\InputFilter\Factory

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>

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

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

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()

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\InputFilter
Inherited
fluent This method is part of a fluent interface and will return the same instance

Parameters

$inputFilter

\Zend\InputFilter\BaseInputFilter

Returns

\Zend\InputFilter\InputFilter

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\InputFilter
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\InputFilter

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

Parameters

$factory

\Zend\InputFilter\Factory

Returns

\Zend\InputFilter\InputFilter

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

 

$data

$data : null | array

Default

 

$factory

$factory : \Zend\InputFilter\Factory

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

 

$validInputs

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

Default

 

Input names

$validationGroup : null | array<mixed,string>

Default