Documentation

HttpKernelInterface

HttpKernelInterface handles a Request to convert it to a Response.

Tags
author

Fabien Potencier fabien@symfony.com

Table of Contents

MAIN_REQUEST  = 1
MASTER_REQUEST  = self::MAIN_REQUEST
SUB_REQUEST  = 2
handle()  : Response
Handles a Request to convert it to a Response.

Constants

MASTER_REQUEST

public mixed MASTER_REQUEST = self::MAIN_REQUEST
Tags
deprecated

since symfony/http-kernel 5.3, use MAIN_REQUEST instead. To ease the migration, this constant won't be removed until Symfony 7.0.

Methods

handle()

Handles a Request to convert it to a Response.

public handle(Request $request[, int $type = self::MAIN_REQUEST ][, bool $catch = true ]) : Response

When $catch is true, the implementation must catch all exceptions and do its best to convert them to a Response instance.

Parameters
$request : Request
$type : int = self::MAIN_REQUEST

The type of the request (one of HttpKernelInterface::MAIN_REQUEST or HttpKernelInterface::SUB_REQUEST)

$catch : bool = true

Whether to catch exceptions or not

Tags
throws
Exception

When an Exception occurs during processing

Return values
Response

Search results