From 49fe3c7c3969189bb84f16584083410e18c1064e Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 15 Aug 2013 15:54:09 +0200 Subject: [PATCH] [HttpKernel] removed the need to use reflection to get a bundle namespace --- src/Symfony/Component/HttpKernel/Bundle/Bundle.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Bundle/Bundle.php b/src/Symfony/Component/HttpKernel/Bundle/Bundle.php index 215d1e1862..d38ba14f17 100644 --- a/src/Symfony/Component/HttpKernel/Bundle/Bundle.php +++ b/src/Symfony/Component/HttpKernel/Bundle/Bundle.php @@ -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, '\\')); } /**