1 | <?php |
||
18 | class ControllerResolver implements ControllerResolverInterface |
||
19 | { |
||
20 | /** |
||
21 | * @var ContainerInterface |
||
22 | */ |
||
23 | protected $container; |
||
24 | |||
25 | public function __construct(ContainerInterface $container) |
||
29 | |||
30 | /** |
||
31 | * {@inheritdoc} |
||
32 | */ |
||
33 | public function getController(ServerRequestInterface $request) |
||
45 | |||
46 | /** |
||
47 | * 创建控制器 |
||
48 | * |
||
49 | * @param string|array $controller |
||
50 | * @return array |
||
51 | */ |
||
52 | protected function createController($controller) |
||
61 | |||
62 | /** |
||
63 | * 创建控制器实例 |
||
64 | * |
||
65 | * @param string $class A class name |
||
66 | * |
||
67 | * @return object |
||
68 | */ |
||
69 | protected function instantiateController($class) |
||
73 | |||
74 | protected function configureController($controller) |
||
81 | } |