1
0
mirror of synced 2025-01-18 06:21:40 +03:00

DDC-771 - Bugfix in EntityGenerator generated use statement

This commit is contained in:
beberlei 2010-08-28 14:53:42 +02:00
parent 43f8398fbb
commit 2a2936fde5

View File

@ -312,7 +312,7 @@ public function <methodName>()
private function _generateEntityUse(ClassMetadataInfo $metadata)
{
if ($this->_extendsClass()) {
return "\n\nuse " . $this->_getClassToExtendNamespace() . ";\n";
return "\n\nuse " . $this->_getClassToExtendName() . ";\n";
}
}
@ -382,13 +382,6 @@ public function <methodName>()
return $refl->getName();
}
private function _getClassToExtendNamespace()
{
$refl = new \ReflectionClass($this->_getClassToExtend());
return $refl->getNamespaceName() ? $refl->getNamespaceName():$refl->getShortName();
}
private function _getClassName(ClassMetadataInfo $metadata)
{
return ($pos = strrpos($metadata->name, '\\'))