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