1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/11415] Create function in finder find_from_extension

PHPBB3-11415
This commit is contained in:
Nathan Guse
2013-05-10 13:58:55 -05:00
parent 1b34ddb330
commit 27b2bbb8ff
2 changed files with 30 additions and 13 deletions

View File

@@ -125,21 +125,10 @@ class phpbb_extension_base implements phpbb_extension_interface
}
// Only have the finder search in this extension path directory
$extensions = array(
$this->extension_name => $this->extension_path,
);
$finder = $this->extension_manager->get_finder();
$migrations = array();
$file_list = $finder
$migrations = $finder
->extension_directory('/migrations')
->find_from_paths($extensions);
foreach ($file_list as $file)
{
$migrations[$file['named_path']] = $file['ext_name'];
}
->find_from_extension($this->extension_name, $this->extension_path);
$migrations = $finder->get_classes_from_files($migrations);
return $migrations;