@@ 12-24 (lines=13) @@ | ||
9 | use Symfony\Component\Routing\RequestContext; |
|
10 | use Symfony\Component\Routing\RouteCollection; |
|
11 | ||
12 | class UrlGeneratorFactory |
|
13 | { |
|
14 | public function __invoke(ContainerInterface $container) : UrlGenerator |
|
15 | { |
|
16 | /** @var RouteCollection $routeCollection */ |
|
17 | $routeCollection = $container->get(RouteCollection::class); |
|
18 | ||
19 | /** @var RequestContext $context */ |
|
20 | $context = $container->get(RequestContext::class); |
|
21 | ||
22 | return new UrlGenerator($routeCollection, $context); |
|
23 | } |
|
24 | } |
|
25 |
@@ 12-24 (lines=13) @@ | ||
9 | use Symfony\Component\Routing\RequestContext; |
|
10 | use Symfony\Component\Routing\RouteCollection; |
|
11 | ||
12 | class UrlMatcherFactory |
|
13 | { |
|
14 | public function __invoke(ContainerInterface $container) : UrlMatcher |
|
15 | { |
|
16 | /** @var RouteCollection $routeCollection */ |
|
17 | $routeCollection = $container->get(RouteCollection::class); |
|
18 | ||
19 | /** @var RequestContext $context */ |
|
20 | $context = $container->get(RequestContext::class); |
|
21 | ||
22 | return new UrlMatcher($routeCollection, $context); |
|
23 | } |
|
24 | } |
|
25 |