Total Complexity | 3 |
Total Lines | 52 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
13 | class Client |
||
14 | { |
||
15 | /** |
||
16 | * Our CDC domain. |
||
17 | * |
||
18 | * @var string |
||
19 | */ |
||
20 | private string $domain; |
||
21 | |||
22 | /** |
||
23 | * The CDC server we send requests to. |
||
24 | * |
||
25 | * @var Server |
||
26 | */ |
||
27 | private Server $server; |
||
28 | |||
29 | |||
30 | /** |
||
31 | * Initialize a CDC client. |
||
32 | * |
||
33 | * @param string $domain The domain we should query the server for. |
||
34 | */ |
||
35 | public function __construct(string $domain) |
||
39 | } |
||
40 | |||
41 | |||
42 | /** |
||
43 | * Receive a CDC response. |
||
44 | * |
||
45 | * @return array|null The response, or NULL if no response is received. |
||
46 | */ |
||
47 | public function getResponse(): ?array |
||
50 | } |
||
51 | |||
52 | |||
53 | /** |
||
54 | * Send a request. |
||
55 | * |
||
56 | * @param string $returnTo The URL we should return to afterwards. |
||
57 | * @param string $op The operation we are performing. |
||
58 | * @param array $params Additional parameters. |
||
59 | */ |
||
60 | public function sendRequest(string $returnTo, string $op, array $params = []): void |
||
67 |