I've successfully created a custom Doctrine Hydrator, and can use it by calling the 

```
$entityManager->getConfiguration()->addCustomHydrationMode('...', '...')

```

method.

However, I'm injecting dependencies into constructors via factories, so the entity manager isn't available in the classes themselves - which makes inheritance a bit more annoying (factory inheritance anyone?).

What I would prefer is to be able to configure my custom hydrators in the zf2 config file (where all the routes, services, other doctrine stuff etc is configured) - but I can't find any documentation on how to specify this.

1. Is this even possible?
2. What are the magic incantations necessary?

Cheers