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

[ticket/12090] Make provider a service and inject it into the helper

PHPBB3-12090
This commit is contained in:
Joas Schilling
2014-03-08 16:32:43 +01:00
parent 275910d8b0
commit 07c07171f9
7 changed files with 28 additions and 35 deletions

View File

@@ -53,8 +53,8 @@ function phpbb_get_url_matcher(\phpbb\extension\finder $finder, RequestContext $
*/
function phpbb_create_dumped_url_matcher(\phpbb\extension\finder $finder, $root_path, $php_ext)
{
$provider = new \phpbb\controller\provider();
$routes = $provider->import_paths_from_finder($finder)->find($root_path);
$provider = new \phpbb\controller\provider($finder);
$routes = $provider->find($root_path);
$dumper = new PhpMatcherDumper($routes);
$cached_url_matcher_dump = $dumper->dump(array(
'class' => 'phpbb_url_matcher',
@@ -72,8 +72,8 @@ function phpbb_create_dumped_url_matcher(\phpbb\extension\finder $finder, $root_
*/
function phpbb_create_url_matcher(\phpbb\extension\finder $finder, RequestContext $context, $root_path)
{
$provider = new \phpbb\controller\provider();
$routes = $provider->import_paths_from_finder($finder)->find($root_path);
$provider = new \phpbb\controller\provider($finder);
$routes = $provider->find($root_path);
return new UrlMatcher($routes, $context);
}