[Routing] fixed previous commit
This commit is contained in:
parent
b588caf467
commit
5ee8eca0ee
@ -56,7 +56,7 @@ class XmlFileLoader extends FileLoader
|
|||||||
$type = (string) $node->getAttribute('type');
|
$type = (string) $node->getAttribute('type');
|
||||||
$prefix = (string) $node->getAttribute('prefix');
|
$prefix = (string) $node->getAttribute('prefix');
|
||||||
$this->currentDir = dirname($path);
|
$this->currentDir = dirname($path);
|
||||||
$collection->addCollection($this->import($file, $type), $prefix);
|
$collection->addCollection($this->import($resource, $type), $prefix);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new \InvalidArgumentException(sprintf('Unable to parse tag "%s"', $node->tagName));
|
throw new \InvalidArgumentException(sprintf('Unable to parse tag "%s"', $node->tagName));
|
||||||
|
@ -57,7 +57,7 @@ class YamlFileLoader extends FileLoader
|
|||||||
$type = isset($config['type']) ? $config['type'] : null;
|
$type = isset($config['type']) ? $config['type'] : null;
|
||||||
$prefix = isset($config['prefix']) ? $config['prefix'] : null;
|
$prefix = isset($config['prefix']) ? $config['prefix'] : null;
|
||||||
$this->currentDir = dirname($path);
|
$this->currentDir = dirname($path);
|
||||||
$collection->addCollection($this->import($file, $type), $prefix);
|
$collection->addCollection($this->import($config['resource'], $type), $prefix);
|
||||||
} elseif (isset($config['pattern'])) {
|
} elseif (isset($config['pattern'])) {
|
||||||
$this->parseRoute($collection, $name, $config, $path);
|
$this->parseRoute($collection, $name, $config, $path);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user