DDC-771 - Bugfix in EntityGenerator generated use statement
This commit is contained in:
parent
43f8398fbb
commit
2a2936fde5
@ -312,7 +312,7 @@ public function <methodName>()
|
|||||||
private function _generateEntityUse(ClassMetadataInfo $metadata)
|
private function _generateEntityUse(ClassMetadataInfo $metadata)
|
||||||
{
|
{
|
||||||
if ($this->_extendsClass()) {
|
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();
|
return $refl->getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
private function _getClassToExtendNamespace()
|
|
||||||
{
|
|
||||||
$refl = new \ReflectionClass($this->_getClassToExtend());
|
|
||||||
|
|
||||||
return $refl->getNamespaceName() ? $refl->getNamespaceName():$refl->getShortName();
|
|
||||||
}
|
|
||||||
|
|
||||||
private function _getClassName(ClassMetadataInfo $metadata)
|
private function _getClassName(ClassMetadataInfo $metadata)
|
||||||
{
|
{
|
||||||
return ($pos = strrpos($metadata->name, '\\'))
|
return ($pos = strrpos($metadata->name, '\\'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user