From 31efc9a1495d415b49ba4f812ee696c479e5fe48 Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Fri, 5 Nov 2010 22:17:05 +0100 Subject: [PATCH] DDC-861 - Rework ProxyFactory to not use autoloader anymore --- lib/Doctrine/ORM/Proxy/ProxyFactory.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/ORM/Proxy/ProxyFactory.php b/lib/Doctrine/ORM/Proxy/ProxyFactory.php index 472e73013..8be75d996 100644 --- a/lib/Doctrine/ORM/Proxy/ProxyFactory.php +++ b/lib/Doctrine/ORM/Proxy/ProxyFactory.php @@ -77,9 +77,11 @@ class ProxyFactory $proxyClassName = str_replace('\\', '', $className) . 'Proxy'; $fqn = $this->_proxyNamespace . '\\' . $proxyClassName; - if ($this->_autoGenerate && ! class_exists($fqn, false)) { + if (! class_exists($fqn, false)) { $fileName = $this->_proxyDir . DIRECTORY_SEPARATOR . $proxyClassName . '.php'; - $this->_generateProxyClass($this->_em->getClassMetadata($className), $proxyClassName, $fileName, self::$_proxyClassTemplate); + if ($this->_autoGenerate) { + $this->_generateProxyClass($this->_em->getClassMetadata($className), $proxyClassName, $fileName, self::$_proxyClassTemplate); + } require $fileName; }