3
3
namespace Symfony \Cmf \Bundle \RoutingAutoBundle \AutoRoute ;
4
4
5
5
use Symfony \Component \DependencyInjection \ContainerInterface ;
6
+ use Symfony \Cmf \Bundle \RoutingAutoBundle \AutoRoute \RouteStack \Builder ;
7
+ use Symfony \Cmf \Bundle \RoutingAutoBundle \AutoRoute \RouteStack \BuilderUnitChain ;
8
+ use Symfony \Cmf \Bundle \RoutingAutoBundle \AutoRoute \RouteStack \BuilderUnit ;
6
9
7
10
/**
8
11
* @author Daniel Leech <[email protected] >
@@ -24,7 +27,7 @@ class Factory
24
27
protected $ container ;
25
28
protected $ builder ;
26
29
27
- public function __construct (ContainerInterface $ container , RouteStackBuilder $ builder )
30
+ public function __construct (ContainerInterface $ container , Builder $ builder )
28
31
{
29
32
$ this ->container = $ container ;
30
33
$ this ->builder = $ builder ;
@@ -44,7 +47,7 @@ public function registerAlias($type, $alias, $id)
44
47
$ this ->serviceIds [$ type ][$ alias ] = $ id ;
45
48
}
46
49
47
- public function getRouteStackBuilderChain ($ classFqn )
50
+ public function getRouteStackBuilderUnitChain ($ classFqn )
48
51
{
49
52
if (!isset ($ this ->routeStackChains [$ classFqn ])) {
50
53
$ this ->routeStackChains [$ classFqn ] = $ this ->generateRouteStackChain ($ classFqn );
@@ -69,23 +72,23 @@ protected function generateRouteStackChain($classFqn)
69
72
{
70
73
$ mapping = $ this ->getMapping ($ classFqn );
71
74
72
- $ routeStackChain = new RouteStackBuilderUnitChain ($ this ->builder );
75
+ $ routeStackChain = new BuilderUnitChain ($ this ->builder );
73
76
74
77
foreach ($ mapping ['content_path ' ] as $ builderName => $ builderConfig ) {
75
78
$ builderUnit = $ this ->generateBuilderUnit ($ builderConfig );
76
- $ routeStackChain ->addRouteStackBuilderUnit ($ builderName , $ builderUnit );
79
+ $ routeStackChain ->addBuilderUnit ($ builderName , $ builderUnit );
77
80
}
78
81
79
82
return $ routeStackChain ;
80
83
}
81
84
82
85
protected function generateBuilderUnit ($ config )
83
86
{
84
- $ pathProvider = $ this ->getBuilderService ($ builderConfig , 'provider ' , 'name ' );
85
- $ existsAction = $ this ->getBuilderService ($ builderConfig , 'exists_action ' , 'strategy ' );
86
- $ notExistsAction = $ this ->getBuilderService ($ builderConfig , 'not_exists_action ' , 'strategy ' );
87
+ $ pathProvider = $ this ->getBuilderService ($ config , 'provider ' , 'name ' );
88
+ $ existsAction = $ this ->getBuilderService ($ config , 'exists_action ' , 'strategy ' );
89
+ $ notExistsAction = $ this ->getBuilderService ($ config , 'not_exists_action ' , 'strategy ' );
87
90
88
- $ builderUnit = new RouteStackBuilderUnit (
91
+ $ builderUnit = new BuilderUnit (
89
92
$ pathProvider ,
90
93
$ existsAction ,
91
94
$ notExistsAction
0 commit comments