1 | <?php |
||
27 | final class HttpClientConfigurator |
||
28 | { |
||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | private $endpoint = 'https://api.phraseapp.com'; |
||
33 | |||
34 | /** |
||
35 | * @var UriFactoryInterface |
||
36 | */ |
||
37 | private $uriFactory; |
||
38 | |||
39 | /** |
||
40 | * @var HttpClient |
||
41 | */ |
||
42 | private $httpClient; |
||
43 | |||
44 | /** |
||
45 | * @var Plugin[] |
||
46 | */ |
||
47 | private $prependPlugins = []; |
||
48 | |||
49 | /** |
||
50 | * @var Plugin[] |
||
51 | */ |
||
52 | private $appendPlugins = []; |
||
53 | |||
54 | /** |
||
55 | * @var string |
||
56 | */ |
||
57 | private $token; |
||
58 | |||
59 | /** |
||
60 | * @param string $token |
||
61 | * @param HttpClient|null $httpClient |
||
62 | * @param UriFactoryInterface|null $uriFactory |
||
63 | */ |
||
64 | 4 | public function __construct(string $token, HttpClient $httpClient = null, UriFactoryInterface $uriFactory = null) |
|
70 | |||
71 | /** |
||
72 | * @return HttpClient |
||
73 | */ |
||
74 | public function createConfiguredClient(): HttpClient |
||
86 | |||
87 | /** |
||
88 | * @param string $endpoint |
||
89 | * |
||
90 | * @return HttpClientConfigurator |
||
91 | */ |
||
92 | public function setEndpoint(string $endpoint): HttpClientConfigurator |
||
98 | |||
99 | /** |
||
100 | * @param Plugin ...$plugin |
||
101 | * |
||
102 | * @return HttpClientConfigurator |
||
103 | */ |
||
104 | 2 | public function appendPlugin(Plugin ...$plugin): HttpClientConfigurator |
|
112 | |||
113 | /** |
||
114 | * @param Plugin ...$plugin |
||
115 | * |
||
116 | * @return HttpClientConfigurator |
||
117 | */ |
||
118 | 2 | public function prependPlugin(Plugin ...$plugin): HttpClientConfigurator |
|
127 | } |
||
128 |
This method has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.