Methods

Add an input to the input filter

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

Countable: number of inputs in this input filter

count() : int
Inherited

Only details the number of direct children.

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

Returns

int

Retrieve a named input

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

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

Parameters

$name

string

Exceptions

\Zend\InputFilter\Exception\InvalidArgumentException

Returns

Get factory to use when adding inputs and filters by spec

getFactory() : \Zend\InputFilter\Factory

Lazy-loads a Factory instance if none attached.

Returns

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

Returns

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\BaseInputFilter::getMessages()

Returns

array

Retrieve a raw (unfiltered) value from a named input

getRawValue(string $name) : mixed
Inherited

inherited_from \Zend\InputFilter\BaseInputFilter::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\BaseInputFilter::getRawValues()

Returns

array

Return the unknown input

getUnknown() : array
Inherited

inherited_from \Zend\InputFilter\BaseInputFilter::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()

Returns

Retrieve a value from a named input

getValue(string $name) : mixed
Inherited

inherited_from \Zend\InputFilter\BaseInputFilter::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\BaseInputFilter::getValues()

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

Parameters

$name

string

Returns

bool

Is the data set has unknown input ?

hasUnknown() : bool
Inherited

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

Exceptions

\Zend\InputFilter\Exception\RuntimeException

Returns

bool

Is the data set valid?

isValid() : bool
Inherited

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

Exceptions

\Zend\InputFilter\Exception\RuntimeException

Returns

bool

Remove a named input

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

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

Parameters

$name

string

Returns

Set data to use when validating and filtering

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

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

Parameters

$data

array\Traversable

Exceptions

\Zend\InputFilter\Exception\InvalidArgumentException

Returns

Set factory to use when adding inputs and filters by spec

setFactory(\Zend\InputFilter\Factory $factory) : \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\BaseInputFilter::setValidationGroup()

Parameters

$name

mixed

Returns

Populate the values of all attached inputs

populate() : void
Inherited

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

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

validateValidationGroup(array $inputs) : void
Inherited

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

Parameters

$inputs

array

Exceptions

\Zend\InputFilter\Exception\InvalidArgumentException

 Properties

 

$data

$data 
Inherited

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

$factory

$factory : \Zend\InputFilter\Factory

 

$inputs

$inputs 
Inherited

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

$invalidInputs

$invalidInputs 
Inherited

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

$validInputs

$validInputs 
Inherited

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

$validationGroup

$validationGroup 
Inherited

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

 Constants

 

VALIDATE_ALL

VALIDATE_ALL 
Inherited

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