[DDC-1673] Fixed unused in ProxyFactory.
This commit is contained in:
parent
a47e566382
commit
bf80ee6a30
@ -106,11 +106,16 @@ class ProxyFactory
|
||||
* Generate the Proxy file name
|
||||
*
|
||||
* @param string $className
|
||||
* @param string $baseDir Optional base directory for proxy file name generation.
|
||||
* If not specified, the directory configured on the Configuration of the
|
||||
* EntityManager will be used by this factory.
|
||||
* @return string
|
||||
*/
|
||||
private function getProxyFileName($className)
|
||||
private function getProxyFileName($className, $baseDir = null)
|
||||
{
|
||||
return $this->_proxyDir . DIRECTORY_SEPARATOR . '__CG__' . str_replace('\\', '', $className) . '.php';
|
||||
$proxyDir = $baseDir ?: $this->_proxyDir;
|
||||
|
||||
return $proxyDir . DIRECTORY_SEPARATOR . '__CG__' . str_replace('\\', '', $className) . '.php';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -124,14 +129,16 @@ class ProxyFactory
|
||||
public function generateProxyClasses(array $classes, $toDir = null)
|
||||
{
|
||||
$proxyDir = $toDir ?: $this->_proxyDir;
|
||||
$proxyDir = rtrim($proxyDir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
|
||||
$proxyDir = rtrim($proxyDir, DIRECTORY_SEPARATOR);
|
||||
|
||||
foreach ($classes as $class) {
|
||||
/* @var $class ClassMetadata */
|
||||
if ($class->isMappedSuperclass) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$proxyFileName = $this->getProxyFileName($class->name);
|
||||
$proxyFileName = $this->getProxyFileName($class->name, $proxyDir);
|
||||
|
||||
$this->_generateProxyClass($class, $proxyFileName, self::$_proxyClassTemplate);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user