Преглед изворни кода

[HttpKernel] removed unused and bugged method

Fabien Potencier пре 14 година
родитељ
комит
5f177d5a51
1 измењених фајлова са 0 додато и 17 уклоњено
  1. 0 17
      src/Symfony/Component/HttpKernel/Kernel.php

+ 0 - 17
src/Symfony/Component/HttpKernel/Kernel.php

@@ -228,23 +228,6 @@ abstract class Kernel implements HttpKernelInterface, \Serializable
         return false;
     }
 
-    /**
-     * Returns the Bundle name for a given class.
-     *
-     * @param string $class A class name
-     *
-     * @return string The Bundle name or null if the class does not belongs to a bundle
-     */
-    public function getBundleForClass($class)
-    {
-        $namespace = substr($class, 0, strrpos($class, '\\'));
-        foreach (array_keys($this->getBundleDirs()) as $prefix) {
-            if (0 === $pos = strpos($namespace, $prefix)) {
-                return substr($namespace, strlen($prefix) + 1, strpos($class, 'Bundle\\') + 7);
-            }
-        }
-    }
-
     public function getName()
     {
         return $this->name;