aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/routing/file_locator.php
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2015-10-07 23:09:13 +0200
committerTristan Darricau <tristan.darricau@sensiolabs.com>2015-10-08 14:15:44 +0200
commit403c647b9e84640977ca0f98d21d15ceb4957bdb (patch)
tree43ef25beb7444ee2f49f5a814f51b0f268b7bb2e /phpBB/phpbb/routing/file_locator.php
parent82743c792287a1efe906c231df7d22dadc8bedcd (diff)
downloadforums-403c647b9e84640977ca0f98d21d15ceb4957bdb.tar
forums-403c647b9e84640977ca0f98d21d15ceb4957bdb.tar.gz
forums-403c647b9e84640977ca0f98d21d15ceb4957bdb.tar.bz2
forums-403c647b9e84640977ca0f98d21d15ceb4957bdb.tar.xz
forums-403c647b9e84640977ca0f98d21d15ceb4957bdb.zip
[ticket/14220] Move route loading to services
PHPBB3-14220
Diffstat (limited to 'phpBB/phpbb/routing/file_locator.php')
-rw-r--r--phpBB/phpbb/routing/file_locator.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/phpBB/phpbb/routing/file_locator.php b/phpBB/phpbb/routing/file_locator.php
new file mode 100644
index 0000000000..64efcc6c76
--- /dev/null
+++ b/phpBB/phpbb/routing/file_locator.php
@@ -0,0 +1,33 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+namespace phpbb\routing;
+
+use phpbb\filesystem\filesystem_interface;
+use Symfony\Component\Config\FileLocator;
+
+class file_locator extends FileLocator
+{
+ public function __construct(filesystem_interface $filesystem, $paths = [])
+ {
+ $paths = (array) $paths;
+ $absolute_paths = [];
+
+ foreach ($paths as $path)
+ {
+ $absolute_paths[] = $filesystem->realpath($path);
+ }
+
+ parent::__construct($absolute_paths);
+ }
+}