diff --git a/lib/Doctrine/ORM/EntityManager.php b/lib/Doctrine/ORM/EntityManager.php index e492ffeba..94037a3f0 100644 --- a/lib/Doctrine/ORM/EntityManager.php +++ b/lib/Doctrine/ORM/EntityManager.php @@ -26,8 +26,8 @@ use Doctrine\Common\DoctrineException; use Doctrine\DBAL\Connection; use Doctrine\ORM\Mapping\ClassMetadata; use Doctrine\ORM\Mapping\ClassMetadataFactory; -use Doctrine\ORM\DynamicProxy\Factory as ProxyFactory; -use Doctrine\ORM\DynamicProxy\Generator; +use Doctrine\ORM\Proxy\ProxyFactory; +use Doctrine\ORM\Proxy\ProxyClassGenerator; /** * The EntityManager is the central access point to ORM functionality. @@ -147,7 +147,7 @@ class EntityManager $this->_metadataFactory->setCacheDriver($this->_config->getMetadataCacheImpl()); $this->_unitOfWork = new UnitOfWork($this); //FIX: this should be in a factory - $this->_proxyFactory = new ProxyFactory($this, new Generator($this, $this->_config->getCacheDir())); + $this->_proxyFactory = new ProxyFactory($this, new ProxyClassGenerator($this, $this->_config->getCacheDir())); } /** diff --git a/lib/Doctrine/ORM/DynamicProxy/Generator.php b/lib/Doctrine/ORM/Proxy/ProxyClassGenerator.php similarity index 97% rename from lib/Doctrine/ORM/DynamicProxy/Generator.php rename to lib/Doctrine/ORM/Proxy/ProxyClassGenerator.php index 01fead0eb..66634e76d 100644 --- a/lib/Doctrine/ORM/DynamicProxy/Generator.php +++ b/lib/Doctrine/ORM/Proxy/ProxyClassGenerator.php @@ -19,17 +19,18 @@ * . */ -namespace Doctrine\ORM\DynamicProxy; +namespace Doctrine\ORM\Proxy; use Doctrine\ORM\EntityManager; use Doctrine\ORM\Mapping\ClassMetadata; /** - * The DynamicProxyGenerator is used to generate proxy objects for entities at runtime. + * The ProxyClassGenerator is used to generate proxy objects for entities at runtime. * * @author Roman Borschel + * @author Giorgio Sironi * @since 2.0 */ -class Generator +class ProxyClassGenerator { /** The namespace for the generated proxy classes. */ private static $_ns = 'Doctrine\Generated\Proxies\\'; diff --git a/lib/Doctrine/ORM/DynamicProxy/Factory.php b/lib/Doctrine/ORM/Proxy/ProxyFactory.php similarity index 93% rename from lib/Doctrine/ORM/DynamicProxy/Factory.php rename to lib/Doctrine/ORM/Proxy/ProxyFactory.php index bbdb33d51..aa5446923 100644 --- a/lib/Doctrine/ORM/DynamicProxy/Factory.php +++ b/lib/Doctrine/ORM/Proxy/ProxyFactory.php @@ -19,7 +19,7 @@ * . */ -namespace Doctrine\ORM\DynamicProxy; +namespace Doctrine\ORM\Proxy; use Doctrine\ORM\EntityManager; @@ -27,9 +27,10 @@ use Doctrine\ORM\EntityManager; * This Factory is used to create proxy objects for entities at runtime. * * @author Roman Borschel + * @author Giorgio Sironi * @since 2.0 */ -class Factory +class ProxyFactory { private $_em; private $_generator; @@ -42,7 +43,7 @@ class Factory * @param EntityManager $em * @param Generator $generator */ - public function __construct(EntityManager $em, Generator $generator) + public function __construct(EntityManager $em, ProxyClassGenerator $generator) { $this->_em = $em; $this->_generator = $generator;