HttpClientKernel
in package
implements
HttpKernelInterface
FinalYes
An implementation of a Symfony HTTP kernel using a "real" HTTP client.
Tags
Table of Contents
Interfaces
- HttpKernelInterface
- HttpKernelInterface handles a Request to convert it to a Response.
Properties
- $client : mixed
Methods
- __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 $client = null ]) : mixed
Parameters
- $client : HttpClientInterface = null
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
ResponsegetBody()
private
getBody(Request $request) : AbstractPart|null
Parameters
- $request : Request
Return values
AbstractPart|nullgetHeaders()
private
getHeaders(Request $request) : array<string|int, mixed>
Parameters
- $request : Request