mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/11948] Use basename and dirname
PHPBB3-11948
This commit is contained in:
parent
d45582d32a
commit
bd86dea16c
1 changed files with 2 additions and 6 deletions
|
@ -75,12 +75,8 @@ class provider
|
||||||
$routes = new RouteCollection;
|
$routes = new RouteCollection;
|
||||||
foreach ($this->routing_files as $file_path)
|
foreach ($this->routing_files as $file_path)
|
||||||
{
|
{
|
||||||
$path_info = explode('/', $file_path);
|
$loader = new YamlFileLoader(new FileLocator(dirname($base_path . $file_path)));
|
||||||
$file_name = array_pop($path_info);
|
$routes->addCollection($loader->load(basename($file_path)));
|
||||||
$path = implode('/', $path_info) . '/';
|
|
||||||
|
|
||||||
$loader = new YamlFileLoader(new FileLocator($base_path . $path));
|
|
||||||
$routes->addCollection($loader->load($file_name));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $routes;
|
return $routes;
|
||||||
|
|
Loading…
Add table
Reference in a new issue