Methods

Add an input to the input filter

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

inherited_from \Zend\InputFilter\InputFilter::add()

Parameters

$name

nullstring

Exceptions

\Zend\InputFilter\Exception\InvalidArgumentException

Returns

Clear collectionRawValues

clearRawValues() 

access public

Clear collectionValues

clearValues() 

access public

Countable: number of inputs in this input filter

count() : int
Inherited

Only details the number of direct children.

inherited_from \Zend\InputFilter\BaseInputFilter::count()
inherited_from \Zend\InputFilter\InputFilter::count()

Returns

int

Retrieve a named input

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

inherited_from \Zend\InputFilter\BaseInputFilter::get()
inherited_from \Zend\InputFilter\InputFilter::get()

Parameters

$name

string

Exceptions

\Zend\InputFilter\Exception\InvalidArgumentException

Returns

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

getCount() : int

Returns

int

Get factory to use when adding inputs and filters by spec

getFactory() : \Zend\InputFilter\Factory
Inherited

Lazy-loads a Factory instance if none attached.

inherited_from \Zend\InputFilter\InputFilter::getFactory()

Returns

Get the input filter used when looping the data

getInputFilter() : \Zend\InputFilter\BaseInputFilter

Get an array of all inputs

getInputs() : array
Inherited

inherited_from \Zend\InputFilter\BaseInputFilter::getInputs()
inherited_from \Zend\InputFilter\InputFilter::getInputs()

Returns

array

Return a list of inputs that were invalid.

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

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

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

Returns

Get if collection can be empty

getIsRequired() : bool

Returns

bool

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
Inherited

inherited_from \Zend\InputFilter\BaseInputFilter::getRawValue()
inherited_from \Zend\InputFilter\InputFilter::getRawValue()

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
Inherited

inherited_from \Zend\InputFilter\BaseInputFilter::getUnknown()
inherited_from \Zend\InputFilter\InputFilter::getUnknown()

Exceptions

\Zend\InputFilter\Exception\RuntimeException

Returns

array

Return a list of inputs that were valid.

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

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

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

Returns

Retrieve a value from a named input

getValue(string $name) : mixed
Inherited

inherited_from \Zend\InputFilter\BaseInputFilter::getValue()
inherited_from \Zend\InputFilter\InputFilter::getValue()

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
Inherited

inherited_from \Zend\InputFilter\BaseInputFilter::has()
inherited_from \Zend\InputFilter\InputFilter::has()

Parameters

$name

string

Returns

bool

Is the data set has unknown input ?

hasUnknown() : bool
Inherited

inherited_from \Zend\InputFilter\BaseInputFilter::hasUnknown()
inherited_from \Zend\InputFilter\InputFilter::hasUnknown()

Exceptions

\Zend\InputFilter\Exception\RuntimeException

Returns

bool

This function is automatically called when creating element with factory.

init() : void
Inherited

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

inherited_from \Zend\InputFilter\BaseInputFilter::init()
inherited_from \Zend\InputFilter\InputFilter::init()

Is the data set valid?

isValid() : bool

Remove a named input

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

inherited_from \Zend\InputFilter\BaseInputFilter::remove()
inherited_from \Zend\InputFilter\InputFilter::remove()

Parameters

$name

string

Returns

Replace a named input

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

inherited_from \Zend\InputFilter\BaseInputFilter::replace()
inherited_from \Zend\InputFilter\InputFilter::replace()

Parameters

$name

string

Name of the input to replace

Exceptions

\Zend\InputFilter\Exception\InvalidArgumentException

Returns

\Zend\InputFilter\self

Set the count of data to validate

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

Parameters

$count

int

Returns

Set data to use when validating and filtering

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

Set factory to use when adding inputs and filters by spec

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

inherited_from \Zend\InputFilter\InputFilter::setFactory()

Parameters

Returns

Set the input filter to use when looping the data

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

Set if the collection can be empty

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

Parameters

$isRequired

bool

Returns

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
Inherited

inherited_from \Zend\InputFilter\BaseInputFilter::populate()
inherited_from \Zend\InputFilter\InputFilter::populate()

Validate a set of inputs against the current data

validateInputs(array $inputs, array $data) : bool
Inherited

inherited_from \Zend\InputFilter\BaseInputFilter::validateInputs()
inherited_from \Zend\InputFilter\InputFilter::validateInputs()

Parameters

$inputs

array

$data

array

Returns

bool

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

validateValidationGroup(array $inputs) : void
Inherited

inherited_from \Zend\InputFilter\BaseInputFilter::validateValidationGroup()
inherited_from \Zend\InputFilter\InputFilter::validateValidationGroup()

Parameters

$inputs

array

Exceptions

\Zend\InputFilter\Exception\InvalidArgumentException

 Properties

 

$collectionMessages

$collectionMessages 

 

$collectionRawValues

$collectionRawValues 

 

$collectionValues

$collectionValues 

 

$count

$count 

 

$data

$data 
Inherited

inherited_from \Zend\InputFilter\BaseInputFilter::$$data
inherited_from \Zend\InputFilter\InputFilter::$$data
 

$factory

$factory : \Zend\InputFilter\Factory
Inherited

inherited_from \Zend\InputFilter\InputFilter::$$factory
 

$inputFilter

$inputFilter : \Zend\InputFilter\BaseInputFilter

 

$inputs

$inputs 
Inherited

inherited_from \Zend\InputFilter\BaseInputFilter::$$inputs
inherited_from \Zend\InputFilter\InputFilter::$$inputs
 

$invalidInputs

$invalidInputs 
Inherited

inherited_from \Zend\InputFilter\BaseInputFilter::$$invalidInputs
inherited_from \Zend\InputFilter\InputFilter::$$invalidInputs
 

$isRequired

$isRequired 

 

$validInputs

$validInputs 
Inherited

inherited_from \Zend\InputFilter\BaseInputFilter::$$validInputs
inherited_from \Zend\InputFilter\InputFilter::$$validInputs
 

$validationGroup

$validationGroup 
Inherited

inherited_from \Zend\InputFilter\BaseInputFilter::$$validationGroup
inherited_from \Zend\InputFilter\InputFilter::$$validationGroup

 Constants

 

VALIDATE_ALL

VALIDATE_ALL 
Inherited

inherited_from \Zend\InputFilter\InputFilterInterface::VALIDATE_ALL
inherited_from \Zend\InputFilter\BaseInputFilter::VALIDATE_ALL
inherited_from \Zend\InputFilter\InputFilter::VALIDATE_ALL