phpro/zf-doctrine-hydration-module — pull request #8 by gabrielsomoza (2014-12-02 12:50:23+00:00)
Title: Ability to Configure Hydrator Filters

Adds the ability to configure filters for the hydrator:

```php
// ...
'doctrine-hydrator' => array(
'Acme\\V1\\Rest\\User\\UserHydrator' => array (
// ...
'filters' => array(
// a service...
'Acme\\V1\\Rest\\Person\\PersonFilter',
// .. or a lambda / anonymous function ...
'optional_key' => function($field) {
return true; // will always exclude the field
},
// ... or an array
array(
'filter' => 'service' // or lambda,
'condition' => FilterComposite::CONDITION_AND, // default is OR
),
),
),
),
```

If this is interesting then I can throw a few more things in - e.g. a very easy way to exclude fields (by providing some built-in filters).