瀏覽代碼

fixed service first argument

jfsimon 14 年之前
父節點
當前提交
9679029126
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      DependencyInjection/AddDependencyCallsPass.php

+ 3 - 1
DependencyInjection/AddDependencyCallsPass.php

@@ -46,6 +46,8 @@ class AddDependencyCallsPass implements CompilerPassInterface
             $arguments = $definition->getArguments();
             $arguments = $definition->getArguments();
             if (preg_match('/%(.*)%/', $arguments[0], $matches)) {
             if (preg_match('/%(.*)%/', $arguments[0], $matches)) {
                 $class = $container->getParameter($matches[1]);
                 $class = $container->getParameter($matches[1]);
+            } else {
+                $class = $arguments[0];
             }
             }
 
 
             $admins[] = $id;
             $admins[] = $id;
@@ -123,7 +125,7 @@ class AddDependencyCallsPass implements CompilerPassInterface
         }
         }
 
 
         $definition->addMethodCall('configure');
         $definition->addMethodCall('configure');
-        
+
         return $definition;
         return $definition;
     }
     }
 }
 }