Zend\Form\Factory::prepareAndInjectInputFilter
Prepare an input filter instance and inject in the provided form
If the input filter specified is a string, assumes it is a class name, and attempts to instantiate it. If the class does not exist, or does not extend InputFilterInterface, an exception is raised. Otherwise, $spec is passed on to the attached InputFilter Factory instance in order to create the input filter.
Signature
protected function prepareAndInjectInputFilter(string|array|Traversable
$spec,
FormInterface
$form,
string
$method )
Parameters
$spec
— object
$form
— Zend\Form\FormInterface
$method
— string
Returns
- void
Errors/Exceptions
-
DomainException
- for unknown InputFilter class or invalid InputFilter instance