浏览代码

Let the container resolve the value instead of of doing a subset

Christophe Coevoet 13 年之前
父节点
当前提交
16ffca9dbb
共有 1 个文件被更改,包括 1 次插入6 次删除
  1. 1 6
      DependencyInjection/Compiler/AddDependencyCallsCompilerPass.php

+ 1 - 6
DependencyInjection/Compiler/AddDependencyCallsCompilerPass.php

@@ -53,14 +53,9 @@ class AddDependencyCallsCompilerPass implements CompilerPassInterface
                 $this->applyDefaults($container, $id, $attributes);
                 $this->applyDefaults($container, $id, $attributes);
 
 
                 $arguments = $definition->getArguments();
                 $arguments = $definition->getArguments();
-                if (preg_match('/%(.*)%/', $arguments[1], $matches)) {
-                    $class = $container->getParameter($matches[1]);
-                } else {
-                    $class = $arguments[1];
-                }
 
 
                 $admins[] = $id;
                 $admins[] = $id;
-                $classes[$class] = $id;
+                $classes[$arguments[1]] = $id;
 
 
                 $showInDashBord = (boolean)(isset($attributes['show_in_dashboard']) ? $attributes['show_in_dashboard'] : true);
                 $showInDashBord = (boolean)(isset($attributes['show_in_dashboard']) ? $attributes['show_in_dashboard'] : true);
                 if (!$showInDashBord) {
                 if (!$showInDashBord) {