Documentation

HttpClientKernel
in package
implements HttpKernelInterface

An implementation of a Symfony HTTP kernel using a "real" HTTP client.

Tags
author

Fabien Potencier fabien@symfony.com

Interfaces, Classes and Traits

HttpKernelInterface
HttpKernelInterface handles a Request to convert it to a Response.

Table of Contents

$client  : mixed
__construct()  : mixed
handle()  : Response
Handles a Request to convert it to a Response.
getBody()  : AbstractPart|null
getHeaders()  : array<string|int, mixed>

Properties

Methods

handle()

Handles a Request to convert it to a Response.

public handle(Request $request[, int $type = HttpKernelInterface::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 = 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

getHeaders()

private getHeaders(Request $request) : array<string|int, mixed>
Parameters
$request : Request
Return values
array<string|int, mixed>

Search results