1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/11948] Allow resource importing for routing

PHPBB3-11948
This commit is contained in:
Joas Schilling
2013-10-21 21:52:48 +02:00
parent bd86dea16c
commit 51561ed538
4 changed files with 12 additions and 9 deletions

View File

@@ -56,8 +56,7 @@ class provider
// because the finder cannot find it
$this->routing_files = array_merge(array('config/routing.yml'), array_keys($finder
->directory('config')
->prefix('routing')
->suffix('.yml')
->suffix('routing.yml')
->find()
));
@@ -75,8 +74,8 @@ class provider
$routes = new RouteCollection;
foreach ($this->routing_files as $file_path)
{
$loader = new YamlFileLoader(new FileLocator(dirname($base_path . $file_path)));
$routes->addCollection($loader->load(basename($file_path)));
$loader = new YamlFileLoader(new FileLocator($base_path));
$routes->addCollection($loader->load($file_path));
}
return $routes;