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