[HttpKernel] removed the need to use reflection to get a bundle namespace

This commit is contained in:
Fabien Potencier 2013-08-15 15:54:09 +02:00
parent d1ef0f3fdd
commit 49fe3c7c39
1 changed files with 2 additions and 4 deletions

View File

@ -109,11 +109,9 @@ abstract class Bundle extends ContainerAware implements BundleInterface
*/
public function getNamespace()
{
if (null === $this->reflected) {
$this->reflected = new \ReflectionObject($this);
}
$class = get_class($this);
return $this->reflected->getNamespaceName();
return substr($class, 0, strrpos($class, '\\'));
}
/**