2010-04-24 14:48:49 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This file is part of the Symfony package.
|
|
|
|
*
|
2011-03-06 11:40:06 +00:00
|
|
|
* (c) Fabien Potencier <fabien@symfony.com>
|
2010-04-24 14:48:49 +01:00
|
|
|
*
|
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
* file that was distributed with this source code.
|
|
|
|
*/
|
|
|
|
|
2011-01-15 13:29:43 +00:00
|
|
|
namespace Symfony\Component\HttpKernel;
|
|
|
|
|
|
|
|
use Symfony\Component\HttpFoundation\Request;
|
2011-04-24 07:44:29 +01:00
|
|
|
use Symfony\Component\HttpFoundation\Response;
|
2011-01-15 13:29:43 +00:00
|
|
|
|
2010-04-24 14:48:49 +01:00
|
|
|
/**
|
2010-11-06 14:13:23 +00:00
|
|
|
* HttpKernelInterface handles a Request to convert it to a Response.
|
2010-04-24 14:48:49 +01:00
|
|
|
*
|
2011-03-06 11:40:06 +00:00
|
|
|
* @author Fabien Potencier <fabien@symfony.com>
|
2010-04-24 14:48:49 +01:00
|
|
|
*/
|
2010-05-06 11:04:50 +01:00
|
|
|
interface HttpKernelInterface
|
2010-04-24 14:48:49 +01:00
|
|
|
{
|
2010-05-13 16:17:33 +01:00
|
|
|
const MASTER_REQUEST = 1;
|
2010-08-14 17:29:27 +01:00
|
|
|
const SUB_REQUEST = 2;
|
2010-05-13 16:17:33 +01:00
|
|
|
|
2010-05-06 12:25:53 +01:00
|
|
|
/**
|
2010-11-06 14:13:23 +00:00
|
|
|
* Handles a Request to convert it to a Response.
|
|
|
|
*
|
|
|
|
* When $catch is true, the implementation must catch all exceptions
|
|
|
|
* and do its best to convert them to a Response instance.
|
2010-05-06 12:25:53 +01:00
|
|
|
*
|
2019-08-06 06:23:17 +01:00
|
|
|
* @param int $type The type of the request
|
|
|
|
* (one of HttpKernelInterface::MASTER_REQUEST or HttpKernelInterface::SUB_REQUEST)
|
|
|
|
* @param bool $catch Whether to catch exceptions or not
|
2010-05-06 12:25:53 +01:00
|
|
|
*
|
2010-11-06 14:13:23 +00:00
|
|
|
* @return Response A Response instance
|
2010-05-06 12:25:53 +01:00
|
|
|
*
|
2010-11-06 14:13:23 +00:00
|
|
|
* @throws \Exception When an Exception occurs during processing
|
2010-05-06 12:25:53 +01:00
|
|
|
*/
|
2019-07-01 14:02:28 +01:00
|
|
|
public function handle(Request $request, int $type = self::MASTER_REQUEST, bool $catch = true);
|
2010-04-24 14:48:49 +01:00
|
|
|
}
|