1 | <?php |
||
23 | class KernelClient implements HttpAsyncClient |
||
24 | { |
||
25 | /** |
||
26 | * @var RequestStack |
||
27 | */ |
||
28 | private $requestStack; |
||
29 | |||
30 | /** |
||
31 | * @var HttpCacheAwareKernelInterface |
||
32 | */ |
||
33 | private $kernel; |
||
34 | |||
35 | /** |
||
36 | * @var HttpFoundationFactory |
||
37 | */ |
||
38 | private $httpFoundationFactory; |
||
39 | |||
40 | /** |
||
41 | * @var DiactorosFactory |
||
42 | */ |
||
43 | private $psr7Factory; |
||
44 | |||
45 | /** |
||
46 | * KernelClient constructor. |
||
47 | * |
||
48 | * @param RequestStack $requestStack |
||
49 | * @param HttpCacheAwareKernelInterface|null $kernel |
||
50 | */ |
||
51 | public function __construct(RequestStack $requestStack, HttpCacheAwareKernelInterface $kernel = null) |
||
68 | |||
69 | /** |
||
70 | * Converts a PSR-7 request to a Symfony HttpFoundation request, runs |
||
71 | * it through the HttpCache kernel and converts the response back to a PSR-7 |
||
72 | * response. |
||
73 | * |
||
74 | * {@inheritdoc} |
||
75 | */ |
||
76 | public function sendAsyncRequest(RequestInterface $request) |
||
97 | } |
||
98 |