diff --git a/lib/Doctrine/ORM/Configuration.php b/lib/Doctrine/ORM/Configuration.php index 4abdafcc4..7a3445eae 100644 --- a/lib/Doctrine/ORM/Configuration.php +++ b/lib/Doctrine/ORM/Configuration.php @@ -512,6 +512,20 @@ class Configuration extends \Doctrine\DBAL\Configuration } } + /** + * Set the custom hydrator modes in one pass. + * + * @param array An array of ($modeName => $hydrator) + */ + public function setCustomHydrationModes($modes) + { + $this->_attributes['customHydrationMods'] = array(); + + foreach ($modes as $modeName => $hydrator) { + $this->addCustomHydrationMode($modeName, $hydrator); + } + } + /** * Get the hydrator class for the given hydration mode name. *