Documentation

HttpKernel
in package
implements HttpKernelInterface, TerminableInterface

HttpKernel notifies events to convert a Request object to a Response one.

Tags
author

Fabien Potencier fabien@symfony.com

Interfaces, Classes and Traits

HttpKernelInterface
HttpKernelInterface handles a Request to convert it to a Response.
TerminableInterface
Terminable extends the Kernel request/response cycle with dispatching a post response event after sending the response and before shutting down the kernel.

Table of Contents

$dispatcher  : mixed
$requestStack  : mixed
$resolver  : mixed
$argumentResolver  : mixed
__construct()  : mixed
handle()  : Response
Handles a Request to convert it to a Response.
terminate()  : mixed
Terminates a request/response cycle.
filterResponse()  : Response
Filters a response object.
finishRequest()  : mixed
Publishes the finish request event, then pop the request from the stack.
handleRaw()  : Response
Handles a request to convert it to a response.
handleThrowable()  : Response
Handles a throwable by trying to convert it to a Response.
varToString()  : string
Returns a human-readable string for the specified variable.

Properties

$argumentResolver

private mixed $argumentResolver

Methods

handle()

Handles a Request to convert it to a Response.

public handle(Request $request[, int $type = HttpKernelInterface::MAIN_REQUEST ][, bool $catch = true ]) : Response
Parameters
$request : Request
$type : int = HttpKernelInterface::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

Return values
Response

filterResponse()

Filters a response object.

private filterResponse(Response $response, Request $request, int $type) : Response
Parameters
$response : Response
$request : Request
$type : int
Tags
throws
RuntimeException

if the passed object is not a Response instance

Return values
Response

finishRequest()

Publishes the finish request event, then pop the request from the stack.

private finishRequest(Request $request, int $type) : mixed

Note that the order of the operations is important here, otherwise operations such as can lead to weird results.

Parameters
$request : Request
$type : int
Return values
mixed

handleRaw()

Handles a request to convert it to a response.

private handleRaw(Request $request[, int $type = self::MAIN_REQUEST ]) : Response

Exceptions are not caught.

Parameters
$request : Request
$type : int = self::MAIN_REQUEST
Tags
throws
LogicException

If one of the listener does not behave as expected

throws
NotFoundHttpException

When controller cannot be found

Return values
Response

handleThrowable()

Handles a throwable by trying to convert it to a Response.

private handleThrowable(Throwable $e, Request $request, int $type) : Response
Parameters
$e : Throwable
$request : Request
$type : int
Tags
throws
Exception
Return values
Response

varToString()

Returns a human-readable string for the specified variable.

private varToString(mixed $var) : string
Parameters
$var : mixed
Return values
string

Search results