A free and open-source book on ZF3 for beginners


8. Transforming Input Data with Filters

In this chapter, we will provide an overview of standard filters that can be used with your web forms. A filter is a class which takes some input data, processes it, and produces some output data. We will also show how to write a custom filter.

In general, you can even use filters outside forms to process an arbitrary data. For example, filters may be used in a controller action to transform the data passed as GET and/or POST variables to certain format.

ZF3 components covered in this chapter:

Component Description
Zend\Filter Contains various filters classes.
Zend\InputFilter Implements a container for filters/validators.


Top