aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-05-06 18:27:30 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-06-10 11:47:40 +0200
commit183492b01931dec5052e2087f70fa432a2f51b03 (patch)
tree44529b38da7872f3a66c1a95ba1370100f20c604
parentd45c681b40cf0415ce49b2cd7f3f1083e84b367c (diff)
downloadforums-183492b01931dec5052e2087f70fa432a2f51b03.tar
forums-183492b01931dec5052e2087f70fa432a2f51b03.tar.gz
forums-183492b01931dec5052e2087f70fa432a2f51b03.tar.bz2
forums-183492b01931dec5052e2087f70fa432a2f51b03.tar.xz
forums-183492b01931dec5052e2087f70fa432a2f51b03.zip
[ticket/12508] Move \phpbb\extension\finder to \phpbb\finder
PHPBB3-12508
-rw-r--r--phpBB/develop/create_schema_files.php2
-rw-r--r--phpBB/phpbb/controller/provider.php4
-rw-r--r--phpBB/phpbb/db/migrator.php4
-rw-r--r--phpBB/phpbb/extension/base.php6
-rw-r--r--phpBB/phpbb/extension/manager.php6
-rw-r--r--phpBB/phpbb/finder.php (renamed from phpBB/phpbb/extension/finder.php)24
-rw-r--r--tests/controller/helper_route_test.php2
-rw-r--r--tests/extension/finder_test.php4
-rw-r--r--tests/pagination/pagination_test.php2
9 files changed, 27 insertions, 27 deletions
diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php
index b12f5e4d25..05085d39ab 100644
--- a/phpBB/develop/create_schema_files.php
+++ b/phpBB/develop/create_schema_files.php
@@ -44,7 +44,7 @@ require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx);
$phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx);
$phpbb_class_loader->register();
-$finder = new \phpbb\extension\finder(new \phpbb\filesystem(), $phpbb_root_path);
+$finder = new \phpbb\finder(new \phpbb\filesystem(), $phpbb_root_path);
$classes = $finder->core_path('phpbb/')
->directory('/db/migration/data')
->get_classes();
diff --git a/phpBB/phpbb/controller/provider.php b/phpBB/phpbb/controller/provider.php
index 91f3a07fb1..bd85385a41 100644
--- a/phpBB/phpbb/controller/provider.php
+++ b/phpBB/phpbb/controller/provider.php
@@ -46,10 +46,10 @@ class provider
}
/**
- * @param \phpbb\extension\finder $finder
+ * @param \phpbb\finder $finder
* @return null
*/
- public function find_routing_files(\phpbb\extension\finder $finder)
+ public function find_routing_files(\phpbb\finder $finder)
{
// We hardcode the path to the core config directory
// because the finder cannot find it
diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php
index 9b9532a7ad..5255c73c1c 100644
--- a/phpBB/phpbb/db/migrator.php
+++ b/phpBB/phpbb/db/migrator.php
@@ -714,7 +714,7 @@ class migrator
/**
* Load migration data files from a directory
*
- * @param \phpbb\extension\finder $finder
+ * @param \phpbb\finder $finder
* @param string $path Path to migration data files
* @param bool $check_fulfillable If TRUE (default), we will check
* if all of the migrations are fulfillable after loading them.
@@ -723,7 +723,7 @@ class migrator
* with the last call to prevent throwing errors unnecessarily).
* @return array Array of migration names
*/
- public function load_migrations(\phpbb\extension\finder $finder, $path, $check_fulfillable = true)
+ public function load_migrations(\phpbb\finder $finder, $path, $check_fulfillable = true)
{
if (!is_dir($path))
{
diff --git a/phpBB/phpbb/extension/base.php b/phpBB/phpbb/extension/base.php
index eb306aeb72..cbbd7bc622 100644
--- a/phpBB/phpbb/extension/base.php
+++ b/phpBB/phpbb/extension/base.php
@@ -23,7 +23,7 @@ class base implements \phpbb\extension\extension_interface
/** @var ContainerInterface */
protected $container;
- /** @var \phpbb\extension\finder */
+ /** @var \phpbb\finder */
protected $finder;
/** @var \phpbb\db\migrator */
@@ -39,11 +39,11 @@ class base implements \phpbb\extension\extension_interface
* Constructor
*
* @param ContainerInterface $container Container object
- * @param \phpbb\extension\finder $extension_finder
+ * @param \phpbb\finder $extension_finder
* @param string $extension_name Name of this extension (from ext.manager)
* @param string $extension_path Relative path to this extension
*/
- public function __construct(ContainerInterface $container, \phpbb\extension\finder $extension_finder, \phpbb\db\migrator $migrator, $extension_name, $extension_path)
+ public function __construct(ContainerInterface $container, \phpbb\finder $extension_finder, \phpbb\db\migrator $migrator, $extension_name, $extension_path)
{
$this->container = $container;
$this->extension_finder = $extension_finder;
diff --git a/phpBB/phpbb/extension/manager.php b/phpBB/phpbb/extension/manager.php
index 88404b025e..bfc6e19b5b 100644
--- a/phpBB/phpbb/extension/manager.php
+++ b/phpBB/phpbb/extension/manager.php
@@ -532,14 +532,14 @@ class manager
}
/**
- * Instantiates a \phpbb\extension\finder.
+ * Instantiates a \phpbb\finder.
*
* @param bool $use_all_available Should we load all extensions, or just enabled ones
- * @return \phpbb\extension\finder An extension finder instance
+ * @return \phpbb\finder An extension finder instance
*/
public function get_finder($use_all_available = false)
{
- $finder = new \phpbb\extension\finder($this->filesystem, $this->phpbb_root_path, $this->cache, $this->php_ext, $this->cache_name . '_finder');
+ $finder = new \phpbb\finder($this->filesystem, $this->phpbb_root_path, $this->cache, $this->php_ext, $this->cache_name . '_finder');
if ($use_all_available)
{
$finder->set_extensions($this->all_available());
diff --git a/phpBB/phpbb/extension/finder.php b/phpBB/phpbb/finder.php
index b67c0709a4..d3eed44c12 100644
--- a/phpBB/phpbb/extension/finder.php
+++ b/phpBB/phpbb/finder.php
@@ -11,7 +11,7 @@
*
*/
-namespace phpbb\extension;
+namespace phpbb;
/**
* The extension finder provides a simple way to locate files in active extensions
@@ -81,7 +81,7 @@ class finder
* Set the array of extensions
*
* @param array $extensions A list of extensions that should be searched aswell
- * @return \phpbb\extension\finder This object for chaining calls
+ * @return \phpbb\finder This object for chaining calls
*/
public function set_extensions(array $extensions)
{
@@ -93,7 +93,7 @@ class finder
* Sets a core path to be searched in addition to extensions
*
* @param string $core_path The path relative to phpbb_root_path
- * @return \phpbb\extension\finder This object for chaining calls
+ * @return \phpbb\finder This object for chaining calls
*/
public function core_path($core_path)
{
@@ -109,7 +109,7 @@ class finder
* file extension is automatically added to suffixes.
*
* @param string $suffix A filename suffix
- * @return \phpbb\extension\finder This object for chaining calls
+ * @return \phpbb\finder This object for chaining calls
*/
public function suffix($suffix)
{
@@ -126,7 +126,7 @@ class finder
* file extension is automatically added to suffixes.
*
* @param string $extension_suffix A filename suffix
- * @return \phpbb\extension\finder This object for chaining calls
+ * @return \phpbb\finder This object for chaining calls
*/
public function extension_suffix($extension_suffix)
{
@@ -142,7 +142,7 @@ class finder
* file extension is automatically added to suffixes.
*
* @param string $core_suffix A filename suffix
- * @return \phpbb\extension\finder This object for chaining calls
+ * @return \phpbb\finder This object for chaining calls
*/
public function core_suffix($core_suffix)
{
@@ -154,7 +154,7 @@ class finder
* Sets the prefix all files found in extensions and core must match
*
* @param string $prefix A filename prefix
- * @return \phpbb\extension\finder This object for chaining calls
+ * @return \phpbb\finder This object for chaining calls
*/
public function prefix($prefix)
{
@@ -167,7 +167,7 @@ class finder
* Sets a prefix all files found in extensions must match
*
* @param string $extension_prefix A filename prefix
- * @return \phpbb\extension\finder This object for chaining calls
+ * @return \phpbb\finder This object for chaining calls
*/
public function extension_prefix($extension_prefix)
{
@@ -179,7 +179,7 @@ class finder
* Sets a prefix all files found in the core path must match
*
* @param string $core_prefix A filename prefix
- * @return \phpbb\extension\finder This object for chaining calls
+ * @return \phpbb\finder This object for chaining calls
*/
public function core_prefix($core_prefix)
{
@@ -194,7 +194,7 @@ class finder
* the current directory.
*
* @param string $directory
- * @return \phpbb\extension\finder This object for chaining calls
+ * @return \phpbb\finder This object for chaining calls
*/
public function directory($directory)
{
@@ -207,7 +207,7 @@ class finder
* Sets a directory all files found in extensions must be contained in
*
* @param string $extension_directory
- * @return \phpbb\extension\finder This object for chaining calls
+ * @return \phpbb\finder This object for chaining calls
*/
public function extension_directory($extension_directory)
{
@@ -219,7 +219,7 @@ class finder
* Sets a directory all files found in the core path must be contained in
*
* @param string $core_directory
- * @return \phpbb\extension\finder This object for chaining calls
+ * @return \phpbb\finder This object for chaining calls
*/
public function core_directory($core_directory)
{
diff --git a/tests/controller/helper_route_test.php b/tests/controller/helper_route_test.php
index 3756082be6..f604f5d892 100644
--- a/tests/controller/helper_route_test.php
+++ b/tests/controller/helper_route_test.php
@@ -42,7 +42,7 @@ class phpbb_controller_helper_route_test extends phpbb_test_case
)
);
- $finder = new \phpbb\extension\finder(
+ $finder = new \phpbb\finder(
new \phpbb\filesystem(),
dirname(__FILE__) . '/',
new phpbb_mock_cache()
diff --git a/tests/extension/finder_test.php b/tests/extension/finder_test.php
index 0cf268d32b..fa30127ca0 100644
--- a/tests/extension/finder_test.php
+++ b/tests/extension/finder_test.php
@@ -201,7 +201,7 @@ class phpbb_extension_finder_test extends phpbb_test_case
public function test_get_classes_create_cache()
{
$cache = new phpbb_mock_cache;
- $finder = new \phpbb\extension\finder(new \phpbb\filesystem(), dirname(__FILE__) . '/', $cache, 'php', '_custom_cache_name');
+ $finder = new \phpbb\finder(new \phpbb\filesystem(), dirname(__FILE__) . '/', $cache, 'php', '_custom_cache_name');
$finder->set_extensions($this->extension_manager->all_enabled());
$files = $finder->suffix('_class.php')->get_files();
@@ -240,7 +240,7 @@ class phpbb_extension_finder_test extends phpbb_test_case
'is_dir' => false,
);
- $finder = new \phpbb\extension\finder(
+ $finder = new \phpbb\finder(
new \phpbb\filesystem(),
dirname(__FILE__) . '/',
new phpbb_mock_cache(array(
diff --git a/tests/pagination/pagination_test.php b/tests/pagination/pagination_test.php
index 4d6fbac20e..ecdacc21a4 100644
--- a/tests/pagination/pagination_test.php
+++ b/tests/pagination/pagination_test.php
@@ -35,7 +35,7 @@ class phpbb_pagination_pagination_test extends phpbb_template_template_test_case
->will($this->returnCallback(array($this, 'return_callback_implode')));
$manager = new phpbb_mock_extension_manager(dirname(__FILE__) . '/', array());
- $finder = new \phpbb\extension\finder(
+ $finder = new \phpbb\finder(
new \phpbb\filesystem(),
dirname(__FILE__) . '/',
new phpbb_mock_cache()