HttpKernelInterface.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace Symfony\Components\HttpKernel;
  3. use Symfony\Components\HttpFoundation\Request;
  4. /*
  5. * This file is part of the Symfony package.
  6. *
  7. * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
  8. *
  9. * For the full copyright and license information, please view the LICENSE
  10. * file that was distributed with this source code.
  11. */
  12. /**
  13. * HttpKernelInterface.
  14. *
  15. * @author Fabien Potencier <fabien.potencier@symfony-project.com>
  16. */
  17. interface HttpKernelInterface
  18. {
  19. const MASTER_REQUEST = 1;
  20. const SUB_REQUEST = 2;
  21. /**
  22. * Handles a request to convert it to a response.
  23. *
  24. * @param Request $request A Request instance
  25. * @param integer $type The type of the request (one of HttpKernelInterface::MASTER_REQUEST or HttpKernelInterface::SUB_REQUEST)
  26. * @param Boolean $raw Whether to catch exceptions or not
  27. *
  28. * @return Response $response A Response instance
  29. */
  30. public function handle(Request $request = null, $type = self::MASTER_REQUEST, $raw = false);
  31. /**
  32. * Gets the Request instance associated with the master request.
  33. *
  34. * @return Request A Request instance
  35. */
  36. public function getRequest();
  37. }