1 | <?php |
||
17 | class Client implements HttpClient, HttpAsyncClient |
||
18 | { |
||
19 | /** |
||
20 | * React HTTP client. |
||
21 | * |
||
22 | * @var ReactBrowser |
||
23 | */ |
||
24 | private $client; |
||
25 | |||
26 | /** |
||
27 | * React event loop. |
||
28 | * |
||
29 | * @var LoopInterface |
||
30 | */ |
||
31 | private $loop; |
||
32 | |||
33 | /** |
||
34 | * Initialize the React client. |
||
35 | */ |
||
36 | 104 | public function __construct( |
|
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | 51 | public function sendRequest(RequestInterface $request): ResponseInterface |
|
59 | |||
60 | /** |
||
61 | * {@inheritdoc} |
||
62 | */ |
||
63 | 104 | public function sendAsyncRequest(RequestInterface $request) |
|
78 | } |
||
79 |