aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/routing
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2015-04-16 20:44:02 +0200
committerTristan Darricau <tristan.darricau@sensiolabs.com>2015-04-16 20:44:02 +0200
commitf077b72d0ddabd13350bea276069b68d5df4a89c (patch)
treed072352cd49d016b203a2e1de5464cfd9b9dd0c8 /phpBB/phpbb/routing
parentdb9ef52fdd40e2ae8118f458bd12eda540b57bd3 (diff)
parent4bdef6fd21a5dcab455b0cd1ee2652de606929c3 (diff)
downloadforums-f077b72d0ddabd13350bea276069b68d5df4a89c.tar
forums-f077b72d0ddabd13350bea276069b68d5df4a89c.tar.gz
forums-f077b72d0ddabd13350bea276069b68d5df4a89c.tar.bz2
forums-f077b72d0ddabd13350bea276069b68d5df4a89c.tar.xz
forums-f077b72d0ddabd13350bea276069b68d5df4a89c.zip
Merge pull request #3487 from MateBartus/ticket/13697
[ticket/13697] Moving filesystem related functions to filesystem service
Diffstat (limited to 'phpBB/phpbb/routing')
-rw-r--r--phpBB/phpbb/routing/router.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/phpBB/phpbb/routing/router.php b/phpBB/phpbb/routing/router.php
index 4ccd3cf5e3..5313106b0a 100644
--- a/phpBB/phpbb/routing/router.php
+++ b/phpBB/phpbb/routing/router.php
@@ -86,16 +86,23 @@ class router implements RouterInterface
protected $route_collection;
/**
+ * @var \phpbb\filesystem\filesystem_interface
+ */
+ protected $filesystem;
+
+ /**
* Construct method
*
+ * @param \phpbb\filesystem\filesystem_interface $filesystem Filesystem helper
* @param manager $extension_manager Extension manager
* @param string $phpbb_root_path phpBB root path
* @param string $php_ext PHP file extension
* @param string $environment Name of the current environment
* @param array $routing_files Array of strings containing paths to YAML files holding route information
*/
- public function __construct(manager $extension_manager, $phpbb_root_path, $php_ext, $environment, $routing_files = array())
+ public function __construct(\phpbb\filesystem\filesystem_interface $filesystem, manager $extension_manager, $phpbb_root_path, $php_ext, $environment, $routing_files = array())
{
+ $this->filesystem = $filesystem;
$this->extension_manager = $extension_manager;
$this->routing_files = $routing_files;
$this->phpbb_root_path = $phpbb_root_path;
@@ -148,7 +155,7 @@ class router implements RouterInterface
$this->route_collection = new RouteCollection;
foreach ($this->routing_files as $file_path)
{
- $loader = new YamlFileLoader(new FileLocator(phpbb_realpath($base_path)));
+ $loader = new YamlFileLoader(new FileLocator($this->filesystem->realpath($base_path)));
$this->route_collection->addCollection($loader->load($file_path));
}
}