File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,14 @@ public static function create(ContainerInterface $container = null): App
31
31
32
32
$ app = AppFactory::create ();
33
33
34
+ $ controllerInvoker = self ::createControllerInvoker ($ container );
35
+ $ app ->getRouteCollector ()->setDefaultInvocationStrategy ($ controllerInvoker );
36
+
37
+ return $ app ;
38
+ }
39
+
40
+ private static function createControllerInvoker (ContainerInterface $ container ): ControllerInvoker
41
+ {
34
42
$ resolvers = [
35
43
// Inject parameters by name first
36
44
new AssociativeArrayResolver (),
@@ -41,8 +49,7 @@ public static function create(ContainerInterface $container = null): App
41
49
];
42
50
43
51
$ invoker = new Invoker (new ResolverChain ($ resolvers ), $ container );
44
- $ app ->getRouteCollector ()->setDefaultInvocationStrategy (new ControllerInvoker ($ invoker ));
45
52
46
- return $ app ;
53
+ return new ControllerInvoker ( $ invoker ) ;
47
54
}
48
55
}
You can’t perform that action at this time.
0 commit comments