1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[feature/controller] Rename get_paths to import_paths_from_finder

Also removed unused variable from url_matcher function

PHPBB3-10864
This commit is contained in:
David King
2012-11-15 13:59:30 -05:00
parent b4eff4f06a
commit db1d49d559
2 changed files with 9 additions and 21 deletions

View File

@@ -39,7 +39,7 @@ class phpbb_controller_provider
*/
public function __construct($routing_paths = array())
{
$this->set_paths($routing_paths);
$this->routing_paths = $routing_paths;
}
/**
@@ -48,28 +48,16 @@ class phpbb_controller_provider
*
* @return The current instance of this object for method chaining
*/
public function get_paths(phpbb_extension_finder $finder)
public function import_paths_from_finder(phpbb_extension_finder $finder)
{
// We hardcode the path to the core config directory
// because the finder cannot find it
$this->set_paths(array_merge(array('config'), array_map('dirname', array_keys($finder
$this->routing_paths = array_merge(array('config'), array_map('dirname', array_keys($finder
->directory('config')
->prefix('routing')
->suffix('yml')
->find()
))));
return $this;
}
/**
* Set the $routing_paths property with a given list of paths
*
* @return The current instance of this object for method chaining
*/
public function set_paths(array $paths)
{
$this->routing_paths = $paths;
)));
return $this;
}