1 | <?php |
||
30 | class Application extends Container |
||
31 | { |
||
32 | const VERSION = 'v3.2.0'; |
||
33 | |||
34 | /** |
||
35 | * @var Application |
||
36 | */ |
||
37 | public static $app; |
||
38 | |||
39 | /** |
||
40 | * @var string |
||
41 | */ |
||
42 | protected $path; |
||
43 | |||
44 | /** |
||
45 | * @var string |
||
46 | */ |
||
47 | protected $name; |
||
48 | |||
49 | /** |
||
50 | * @var bool |
||
51 | */ |
||
52 | protected $booted = false; |
||
53 | |||
54 | /** |
||
55 | * AppKernel constructor. |
||
56 | * |
||
57 | * @param $path |
||
58 | */ |
||
59 | 37 | public function __construct($path) |
|
69 | |||
70 | /** |
||
71 | * @return string |
||
72 | */ |
||
73 | 37 | public function getName() |
|
77 | |||
78 | /** |
||
79 | * @return bool |
||
80 | */ |
||
81 | 1 | public function isBooted() |
|
85 | |||
86 | /** |
||
87 | * @return string |
||
88 | */ |
||
89 | 37 | public function getPath() |
|
93 | |||
94 | 37 | public function bootstrap() |
|
110 | |||
111 | 37 | protected function registerExceptionHandler() |
|
121 | |||
122 | /** |
||
123 | * @param ServiceProviderInterface[] $services |
||
124 | */ |
||
125 | 37 | protected function registerServicesProviders(array $services) |
|
132 | |||
133 | /** |
||
134 | * @param ServerRequestInterface $request |
||
135 | * |
||
136 | * @return Response |
||
137 | */ |
||
138 | 14 | public function handleRequest(ServerRequestInterface $request) |
|
159 | |||
160 | /** |
||
161 | * @param Response $response |
||
162 | */ |
||
163 | 1 | public function handleResponse(Response $response) |
|
167 | |||
168 | /** |
||
169 | * @param $e |
||
170 | * |
||
171 | * @return Response |
||
172 | */ |
||
173 | 12 | public function handleException($e) |
|
198 | |||
199 | /** |
||
200 | * @return int |
||
201 | */ |
||
202 | public function run() |
||
212 | |||
213 | /** |
||
214 | * @param ServerRequestInterface $request |
||
215 | * @param ResponseInterface $response |
||
216 | * |
||
217 | * @return int |
||
218 | */ |
||
219 | 2 | public function shutdown(ServerRequestInterface $request, ResponseInterface $response) |
|
228 | } |
||
229 |