[Routing] fixed previous commit

This commit is contained in:
Fabien Potencier 2011-02-11 01:54:25 +01:00
parent b588caf467
commit 5ee8eca0ee
2 changed files with 2 additions and 2 deletions

View File

@ -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));

View File

@ -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 {