HttpClientKernel
in package
implements
HttpKernelInterface
An implementation of a Symfony HTTP kernel using a "real" HTTP client.
Tags
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
$client
private
mixed
$client
Methods
__construct()
public
__construct([HttpClientInterface|null $client = null ]) : mixed
Parameters
- $client : HttpClientInterface|null = null
Return values
mixed —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 —getBody()
private
getBody(Request $request) : AbstractPart|null
Parameters
- $request : Request
Return values
AbstractPart|null —getHeaders()
private
getHeaders(Request $request) : array<string|int, mixed>
Parameters
- $request : Request