Преглед на файлове

[DependencyInjection] made a small performance optimization

Fabien Potencier преди 14 години
родител
ревизия
be31bc091e
променени са 1 файла, в които са добавени 2 реда и са изтрити 4 реда
  1. 2 4
      src/Symfony/Component/DependencyInjection/ContainerBuilder.php

+ 2 - 4
src/Symfony/Component/DependencyInjection/ContainerBuilder.php

@@ -623,10 +623,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
      */
     public function findDefinition($id)
     {
-        $id = strtolower($id);
-
-        if ($this->hasAlias($id)) {
-            return $this->findDefinition((string) $this->getAlias($id));
+        while ($this->hasAlias($id)) {
+            $id = (string) $this->getAlias($id);
         }
 
         return $this->getDefinition($id);