From 2dd73d4def895e7d8ff9db60180176ae92da0e82 Mon Sep 17 00:00:00 2001 From: Guilherme Blanco Date: Mon, 29 Jul 2013 10:46:47 -0400 Subject: [PATCH] Kept BC. --- .../ORM/Decorator/EntityManagerDecorator.php | 8 ++++++++ lib/Doctrine/ORM/EntityManager.php | 17 +++++++++++++++++ lib/Doctrine/ORM/EntityManagerInterface.php | 1 + 3 files changed, 26 insertions(+) diff --git a/lib/Doctrine/ORM/Decorator/EntityManagerDecorator.php b/lib/Doctrine/ORM/Decorator/EntityManagerDecorator.php index 23097edac..dc123118f 100644 --- a/lib/Doctrine/ORM/Decorator/EntityManagerDecorator.php +++ b/lib/Doctrine/ORM/Decorator/EntityManagerDecorator.php @@ -221,6 +221,14 @@ abstract class EntityManagerDecorator extends ObjectManagerDecorator implements return $this->wrapped->getUnitOfWork(); } + /** + * {@inheritdoc} + */ + public function getHydrator($hydrationMode) + { + return $this->wrapped->getHydrator($hydrationMode); + } + /** * {@inheritdoc} */ diff --git a/lib/Doctrine/ORM/EntityManager.php b/lib/Doctrine/ORM/EntityManager.php index 220b9d313..d21d3fb86 100644 --- a/lib/Doctrine/ORM/EntityManager.php +++ b/lib/Doctrine/ORM/EntityManager.php @@ -827,6 +827,23 @@ use Doctrine\Common\Util\ClassUtils; return $this->unitOfWork; } + /** + * Gets a hydrator for the given hydration mode. + * + * This method caches the hydrator instances which is used for all queries that don't + * selectively iterate over the result. + * + * @deprecated + * + * @param int $hydrationMode + * + * @return \Doctrine\ORM\Internal\Hydration\AbstractHydrator + */ + public function getHydrator($hydrationMode) + { + return $this->newHydrator($hydrationMode); + } + /** * Create a new instance for the given hydration mode. * diff --git a/lib/Doctrine/ORM/EntityManagerInterface.php b/lib/Doctrine/ORM/EntityManagerInterface.php index aa26e36ab..d72f7cd0c 100644 --- a/lib/Doctrine/ORM/EntityManagerInterface.php +++ b/lib/Doctrine/ORM/EntityManagerInterface.php @@ -51,6 +51,7 @@ interface EntityManagerInterface extends ObjectManager public function getConfiguration(); public function isOpen(); public function getUnitOfWork(); + public function getHydrator($hydrationMode); public function newHydrator($hydrationMode); public function getProxyFactory(); public function getFilters();