1 | <?php |
||
28 | class Client |
||
29 | { |
||
30 | /** |
||
31 | * configurator |
||
32 | * @var \Unikorp\KongAdminApi\ConfiguratorInterface $configurator |
||
33 | */ |
||
34 | private $configurator = null; |
||
35 | |||
36 | /** |
||
37 | * http client |
||
38 | * @var \Http\Client\HttpClient $httpClient |
||
39 | */ |
||
40 | private $httpClient = null; |
||
41 | |||
42 | /** |
||
43 | * message factory |
||
44 | * @var \Http\Message\MessageFactory $messageFactory |
||
45 | */ |
||
46 | private $messageFactory = null; |
||
47 | |||
48 | /** |
||
49 | * plugins |
||
50 | * @var array $plugins |
||
51 | */ |
||
52 | private $plugins = []; |
||
53 | |||
54 | /** |
||
55 | * constructor |
||
56 | * |
||
57 | * @param \Unikorm\KongAdminApi\ConfiguratorInterface $configurator |
||
58 | * @param \Http\Client\HttpClient $httpClient |
||
59 | */ |
||
60 | 3 | public function __construct(ConfiguratorInterface $configurator, HttpClient $httpClient = null) |
|
71 | |||
72 | /** |
||
73 | * get node |
||
74 | * |
||
75 | * @param string $name |
||
76 | * |
||
77 | * @return \Unikorp\KongAdminApi\NodeInterface |
||
78 | */ |
||
79 | 6 | public function getNode(string $name): NodeInterface |
|
85 | |||
86 | /** |
||
87 | * add plugin |
||
88 | * |
||
89 | * @param \Http\Client\Common\Plugin $plugin |
||
90 | * |
||
91 | * @return void |
||
92 | */ |
||
93 | 1 | public function addPlugin(Plugin $plugin): void |
|
97 | |||
98 | /** |
||
99 | * get http client |
||
100 | * |
||
101 | * @return \Http\Client\Common\HttpMethodsClient |
||
102 | */ |
||
103 | 1 | public function getHttpClient(): HttpMethodsClient |
|
110 | } |
||
111 |