Methods
Add an input to the input filter
add(\Zend\InputFilter\InputInterface|\Zend\InputFilter\InputFilterInterface $input, null|string $name = null
) : \Zend\InputFilter\InputFilterInterface
inherited_from |
\Zend\InputFilter\InputFilterInterface::add() |
Parameters
$input
\Zend\InputFilter\InputInterface
\Zend\InputFilter\InputFilterInterface
$name
null
string
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
Only details the number of direct children.
Returns
integer
Retrieve a named input
get(string $name) : \Zend\InputFilter\InputInterface | \Zend\InputFilter\InputFilterInterface
inherited_from |
\Zend\InputFilter\InputFilterInterface::get() |
Parameters
$name
string
Exceptions
\Zend\InputFilter\Exception\InvalidArgumentException |
|
Returns
\Zend\InputFilter\InputInterface
\Zend\InputFilter\InputFilterInterface
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.
inherited_from |
\Zend\InputFilter\InputFilterInterface::getMessages() |
Returns
array
Retrieve a raw (unfiltered) value from a named input
getRawValue(string $name) : mixed
inherited_from |
\Zend\InputFilter\InputFilterInterface::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.
inherited_from |
\Zend\InputFilter\InputFilterInterface::getRawValues() |
Returns
array
Return the unknown input
getUnknown() : array
inherited_from |
\Zend\InputFilter\UnknownInputsCapableInterface::getUnknown() |
Exceptions
\Zend\InputFilter\Exception\RuntimeException |
|
Returns
array
Retrieve a value from a named input
getValue(string $name) : mixed
inherited_from |
\Zend\InputFilter\InputFilterInterface::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.
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_from |
\Zend\InputFilter\InputFilterInterface::has() |
Parameters
$name
string
Returns
boolean
Is the data set has unknown input ?
hasUnknown() : boolean
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_from |
\Zend\Stdlib\InitializableInterface::init() |
Is the data set valid?
isValid(mixed|null $context = null
) : boolean
inherited_from |
\Zend\InputFilter\InputFilterInterface::isValid() |
Parameters
$context
mixed
null
Exceptions
\Zend\InputFilter\Exception\RuntimeException |
|
Returns
boolean
Merges the inputs from an InputFilter into the current one
merge(\Zend\InputFilter\BaseInputFilter $inputFilter) : \Zend\InputFilter\BaseInputFilter
fluent |
This method is part of a fluent interface and will return the same instance |
Parameters
$inputFilter
\Zend\InputFilter\BaseInputFilter
Returns
\Zend\InputFilter\BaseInputFilter
Remove a named input
remove(string $name) : \Zend\InputFilter\InputFilterInterface
inherited_from |
\Zend\InputFilter\InputFilterInterface::remove() |
Parameters
$name
string
Returns
\Zend\InputFilter\InputFilterInterface
Replace a named input
replace(mixed $input, string $name) : \Zend\InputFilter\BaseInputFilter
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\BaseInputFilter
Set data to use when validating and filtering
setData(array|\Traversable $data) : \Zend\InputFilter\InputFilterInterface
inherited_from |
\Zend\InputFilter\InputFilterInterface::setData() |
Parameters
$data
array
\Traversable
Exceptions
\Zend\InputFilter\Exception\InvalidArgumentException |
|
Returns
\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.
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
Ensure all names of a validation group exist as input in the filter
validateValidationGroup(array<mixed,string> $inputs) : void
Parameters
$inputs
array<mixed,string>
Input names
Exceptions
\Zend\InputFilter\Exception\InvalidArgumentException |
|
Properties
$data
$data : null | array
Input names
$validationGroup : null | array<mixed,string>