1
0
Fork 0
mirror of synced 2025-04-03 13:23:37 +03:00

DDC-3427 - Adding setting an EntityManagerInterface instance in the ClassMetadataFactory#setEntityManager()

This commit is contained in:
Marco Pivetta 2014-12-05 13:49:42 +01:00
parent d20e018081
commit e65417f1f6

View file

@ -19,17 +19,17 @@
namespace Doctrine\ORM\Mapping; namespace Doctrine\ORM\Mapping;
use ReflectionException;
use Doctrine\ORM\ORMException;
use Doctrine\ORM\EntityManager;
use Doctrine\DBAL\Platforms;
use Doctrine\ORM\Events;
use Doctrine\Common\Persistence\Mapping\ReflectionService;
use Doctrine\Common\Persistence\Mapping\ClassMetadata as ClassMetadataInterface;
use Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory; use Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory;
use Doctrine\ORM\Id\IdentityGenerator; use Doctrine\Common\Persistence\Mapping\ClassMetadata as ClassMetadataInterface;
use Doctrine\ORM\Id\BigIntegerIdentityGenerator; use Doctrine\Common\Persistence\Mapping\ReflectionService;
use Doctrine\DBAL\Platforms;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Event\LoadClassMetadataEventArgs; use Doctrine\ORM\Event\LoadClassMetadataEventArgs;
use Doctrine\ORM\Events;
use Doctrine\ORM\Id\BigIntegerIdentityGenerator;
use Doctrine\ORM\Id\IdentityGenerator;
use Doctrine\ORM\ORMException;
use ReflectionException;
/** /**
* The ClassMetadataFactory is used to create ClassMetadata objects that contain all the * The ClassMetadataFactory is used to create ClassMetadata objects that contain all the
@ -45,7 +45,7 @@ use Doctrine\ORM\Event\LoadClassMetadataEventArgs;
class ClassMetadataFactory extends AbstractClassMetadataFactory class ClassMetadataFactory extends AbstractClassMetadataFactory
{ {
/** /**
* @var EntityManager * @var EntityManagerInterface|null
*/ */
private $em; private $em;
@ -70,9 +70,9 @@ class ClassMetadataFactory extends AbstractClassMetadataFactory
private $embeddablesActiveNesting = array(); private $embeddablesActiveNesting = array();
/** /**
* @param EntityManager $em * @param EntityManagerInterface $em
*/ */
public function setEntityManager(EntityManager $em) public function setEntityManager(EntityManagerInterface $em)
{ {
$this->em = $em; $this->em = $em;
} }