Pārlūkot izejas kodu

[Routing] fixed previous commit

Fabien Potencier 14 gadi atpakaļ
vecāks
revīzija
5ee8eca0ee

+ 1 - 1
src/Symfony/Component/Routing/Loader/XmlFileLoader.php

@@ -56,7 +56,7 @@ class XmlFileLoader extends FileLoader
                     $type = (string) $node->getAttribute('type');
                     $prefix = (string) $node->getAttribute('prefix');
                     $this->currentDir = dirname($path);
-                    $collection->addCollection($this->import($file, $type), $prefix);
+                    $collection->addCollection($this->import($resource, $type), $prefix);
                     break;
                 default:
                     throw new \InvalidArgumentException(sprintf('Unable to parse tag "%s"', $node->tagName));

+ 1 - 1
src/Symfony/Component/Routing/Loader/YamlFileLoader.php

@@ -57,7 +57,7 @@ class YamlFileLoader extends FileLoader
                 $type = isset($config['type']) ? $config['type'] : null;
                 $prefix = isset($config['prefix']) ? $config['prefix'] : null;
                 $this->currentDir = dirname($path);
-                $collection->addCollection($this->import($file, $type), $prefix);
+                $collection->addCollection($this->import($config['resource'], $type), $prefix);
             } elseif (isset($config['pattern'])) {
                 $this->parseRoute($collection, $name, $config, $path);
             } else {