equal
deleted
inserted
replaced
|
1 <?php |
|
2 |
|
3 /* |
|
4 * This file is part of the Symfony package. |
|
5 * |
|
6 * (c) Fabien Potencier <fabien@symfony.com> |
|
7 * |
|
8 * For the full copyright and license information, please view the LICENSE |
|
9 * file that was distributed with this source code. |
|
10 */ |
|
11 |
|
12 namespace Symfony\Component\HttpKernel; |
|
13 |
|
14 use Symfony\Component\HttpFoundation\Request; |
|
15 use Symfony\Component\HttpFoundation\Response; |
|
16 |
|
17 /** |
|
18 * HttpKernelInterface handles a Request to convert it to a Response. |
|
19 * |
|
20 * @author Fabien Potencier <fabien@symfony.com> |
|
21 * |
|
22 * @api |
|
23 */ |
|
24 interface HttpKernelInterface |
|
25 { |
|
26 const MASTER_REQUEST = 1; |
|
27 const SUB_REQUEST = 2; |
|
28 |
|
29 /** |
|
30 * Handles a Request to convert it to a Response. |
|
31 * |
|
32 * When $catch is true, the implementation must catch all exceptions |
|
33 * and do its best to convert them to a Response instance. |
|
34 * |
|
35 * @param Request $request A Request instance |
|
36 * @param integer $type The type of the request |
|
37 * (one of HttpKernelInterface::MASTER_REQUEST or HttpKernelInterface::SUB_REQUEST) |
|
38 * @param Boolean $catch Whether to catch exceptions or not |
|
39 * |
|
40 * @return Response A Response instance |
|
41 * |
|
42 * @throws \Exception When an Exception occurs during processing |
|
43 * |
|
44 * @api |
|
45 */ |
|
46 function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true); |
|
47 } |