zendframework/zf2 — pull request #5364 by ronan-gloo (2013-10-27 16:34:23+00:00)
Title: Add Naming strategy for Hydrators

This commit is a purpose for key / properties transformations supports through externalized strategies.
It introduce the same behavior implemented for values, but on names level.

- keys / properties translations during hydration / extraction doesn't need to be hardcoded anymore in hydrators.
- Components are reusable through many hydrators.
- Despite values strategies, Only one "global" naming strategy can be defined by Hydrator.

An Underscore <-> CamelCase strategy is shipped by default, in order to keep ClassMethods underscore feature alive, and keep the BC. (the strategy is set / unset on `setUnderscoreSeparatedKeys`)

For others Hydrators, you'll need to set the naming strategy manually:

```php
$hydrator = new Zend\Stdlib\Hydrator\ObjectProperty;
$hydrator->setNamingStrategy(new Zend\Stdlib\Hydrator\NamingStrategy\UnderscoreNamingStrategy);
```

Let me know if you're interested to merge this feature, i'll push unit tests & doc.