1 | <?php |
||
15 | class HttpClient implements AnalyticsClientInterface |
||
16 | { |
||
17 | /** |
||
18 | * @var string endpoint |
||
19 | * |
||
20 | * Where to POST the requests |
||
21 | */ |
||
22 | private $endpoint; |
||
23 | |||
24 | /** |
||
25 | * @var ClientInterface |
||
26 | */ |
||
27 | private $client; |
||
28 | |||
29 | /** |
||
30 | * @var RequestFactoryInterface |
||
31 | */ |
||
32 | private $requestFactory; |
||
33 | |||
34 | |||
35 | 1 | public function __construct(ClientInterface $client, RequestFactoryInterface $requestFactory, string $endpoint) |
|
41 | |||
42 | /** |
||
43 | * Send a post request to the endpoint. |
||
44 | */ |
||
45 | public function send(array $data = []): bool |
||
54 | } |
||
55 |