[HttpKernel] removed the need to use reflection to get a bundle namespace
This commit is contained in:
parent
d1ef0f3fdd
commit
49fe3c7c39
@ -109,11 +109,9 @@ abstract class Bundle extends ContainerAware implements BundleInterface
|
|||||||
*/
|
*/
|
||||||
public function getNamespace()
|
public function getNamespace()
|
||||||
{
|
{
|
||||||
if (null === $this->reflected) {
|
$class = get_class($this);
|
||||||
$this->reflected = new \ReflectionObject($this);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->reflected->getNamespaceName();
|
return substr($class, 0, strrpos($class, '\\'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user