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