Skip to content

Commit

Permalink
DDC-861 - Rework ProxyFactory to not use autoloader anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
beberlei committed Nov 5, 2010
1 parent 6a904a2 commit 31efc9a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/Doctrine/ORM/Proxy/ProxyFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,11 @@ public function getProxy($className, $identifier)
$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;
}

Expand Down

0 comments on commit 31efc9a

Please sign in to comment.