1 | <?php |
||
27 | class Application extends Container |
||
28 | { |
||
29 | /** |
||
30 | * The FastD version. |
||
31 | * |
||
32 | * @const string |
||
33 | */ |
||
34 | const VERSION = '3.1.0'; |
||
35 | |||
36 | /** |
||
37 | * @var Application |
||
38 | */ |
||
39 | public static $app; |
||
40 | |||
41 | /** |
||
42 | * @var string |
||
43 | */ |
||
44 | protected $path; |
||
45 | |||
46 | /** |
||
47 | * @var string |
||
48 | */ |
||
49 | protected $name; |
||
50 | |||
51 | /** |
||
52 | * @var bool |
||
53 | */ |
||
54 | protected $booted = false; |
||
55 | |||
56 | /** |
||
57 | * AppKernel constructor. |
||
58 | * |
||
59 | * @param $path |
||
60 | */ |
||
61 | 60 | public function __construct($path) |
|
71 | |||
72 | /** |
||
73 | * @return string |
||
74 | */ |
||
75 | 60 | public function getName() |
|
79 | |||
80 | /** |
||
81 | * @return bool |
||
82 | */ |
||
83 | 5 | public function isBooted() |
|
87 | |||
88 | /** |
||
89 | * @return string |
||
90 | */ |
||
91 | 60 | public function getPath() |
|
95 | |||
96 | 60 | public function bootstrap() |
|
111 | |||
112 | /** |
||
113 | * @param ServiceProviderInterface[] $services |
||
114 | */ |
||
115 | 60 | protected function registerServicesProviders(array $services) |
|
122 | |||
123 | /** |
||
124 | * @param ServerRequestInterface $request |
||
125 | * |
||
126 | * @return Response |
||
127 | */ |
||
128 | 17 | public function handleRequest(ServerRequestInterface $request) |
|
140 | |||
141 | /** |
||
142 | * @param Response $response |
||
143 | */ |
||
144 | 5 | public function handleResponse(Response $response) |
|
148 | |||
149 | /** |
||
150 | * @param Exception $e |
||
151 | * |
||
152 | * @return Http\JsonResponse |
||
153 | */ |
||
154 | 10 | public function handleException(Exception $e) |
|
168 | |||
169 | /** |
||
170 | * @return int |
||
171 | */ |
||
172 | public function run() |
||
182 | |||
183 | /** |
||
184 | * @param ServerRequestInterface $request |
||
185 | * @param ResponseInterface $response |
||
186 | * |
||
187 | * @return int |
||
188 | */ |
||
189 | 8 | public function shutdown(ServerRequestInterface $request, ResponseInterface $response) |
|
200 | } |
||
201 |