1 | <?php |
||
21 | class Dispatcher |
||
22 | { |
||
23 | use ContainerAwareTrait; |
||
24 | use HasResolverPipelineTrait; |
||
25 | use HasRequestTrait; |
||
26 | use HasCommandsCollection; |
||
27 | |||
28 | /** |
||
29 | * Create a new controller dispatcher instance. |
||
30 | * |
||
31 | * @param Container $container |
||
32 | * @return void |
||
|
|||
33 | */ |
||
34 | 4 | public function __construct(Container $container = null) |
|
40 | |||
41 | /** |
||
42 | * @param Request|null $request |
||
43 | * @return \Psr\Http\Message\ResponseInterface |
||
44 | * @throws Exception |
||
45 | */ |
||
46 | public function dispatch(Request $request = null) |
||
55 | |||
56 | /** |
||
57 | * @param Request|null $request |
||
58 | * @return |
||
59 | */ |
||
60 | public function callFromRequest(Request $request = null) |
||
67 | |||
68 | /** |
||
69 | * @param Command $command |
||
70 | * @return Command |
||
71 | */ |
||
72 | 3 | public function dispatchCommand(Command $command) |
|
86 | |||
87 | /** |
||
88 | * @param bool $params |
||
89 | */ |
||
90 | public function throwError($params = false) |
||
98 | |||
99 | /** |
||
100 | * @return $this |
||
101 | */ |
||
102 | public function setErrorController() |
||
110 | |||
111 | /** |
||
112 | * @param bool $action |
||
113 | * @param bool $controller |
||
114 | * @param bool $module |
||
115 | * @param array $params |
||
116 | * @throws ForwardException |
||
117 | */ |
||
118 | public function forward($action = false, $controller = false, $module = false, $params = []) |
||
135 | } |
||
136 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.