1 | <?php |
||
20 | trait SetGetTrait |
||
21 | { |
||
22 | /** |
||
23 | * Backend username |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $username; |
||
28 | |||
29 | /** |
||
30 | * Backend password |
||
31 | * |
||
32 | * @var string |
||
33 | */ |
||
34 | protected $password; |
||
35 | |||
36 | /** |
||
37 | * Backend API key |
||
38 | * |
||
39 | * @var string |
||
40 | */ |
||
41 | protected $apiKey; |
||
42 | |||
43 | /** |
||
44 | * When true, backend prints "TEST MODE" water mark into output document, and API call does not count against quota |
||
45 | * |
||
46 | * @var bool |
||
47 | */ |
||
48 | protected $test; |
||
49 | |||
50 | /** |
||
51 | * Backend base URI |
||
52 | * |
||
53 | * @var string |
||
54 | */ |
||
55 | protected $baseUri; |
||
56 | |||
57 | /** |
||
58 | * Backend version string |
||
59 | * |
||
60 | * @var string |
||
61 | */ |
||
62 | protected $version; |
||
63 | |||
64 | /** |
||
65 | * Backend timeout in seconds |
||
66 | * |
||
67 | * @var int |
||
68 | */ |
||
69 | protected $timeout; |
||
70 | |||
71 | /** |
||
72 | * REST client to backend |
||
73 | * |
||
74 | * @var Client |
||
75 | */ |
||
76 | protected $client; |
||
77 | |||
78 | /** |
||
79 | * Debug flag of REST client |
||
80 | * |
||
81 | * @var bool |
||
82 | */ |
||
83 | protected $debug; |
||
84 | |||
85 | /** |
||
86 | * Return the REST client of the backend web service |
||
87 | * |
||
88 | * @return \GuzzleHttp\Client |
||
89 | */ |
||
90 | 23 | public function getClient() |
|
125 | |||
126 | /** |
||
127 | * Set the REST client of the backend web service |
||
128 | * |
||
129 | * @param Client $client REST client |
||
130 | * |
||
131 | * @return ReportingCloud |
||
132 | */ |
||
133 | 23 | public function setClient(Client $client) |
|
139 | |||
140 | /** |
||
141 | * Return the username |
||
142 | * |
||
143 | * @return string |
||
144 | */ |
||
145 | 26 | public function getUsername() |
|
149 | |||
150 | /** |
||
151 | * Set the username |
||
152 | * |
||
153 | * @param string $username Username |
||
154 | * |
||
155 | * @return ReportingCloud |
||
156 | */ |
||
157 | 65 | public function setUsername($username) |
|
163 | |||
164 | /** |
||
165 | * Return the password |
||
166 | * |
||
167 | * @return string |
||
168 | */ |
||
169 | 26 | public function getPassword() |
|
173 | |||
174 | /** |
||
175 | * Set the password |
||
176 | * |
||
177 | * @param string $password Password |
||
178 | * |
||
179 | * @return ReportingCloud |
||
180 | */ |
||
181 | 65 | public function setPassword($password) |
|
187 | |||
188 | /** |
||
189 | * Return the API key |
||
190 | * |
||
191 | * @return string |
||
192 | */ |
||
193 | 23 | public function getApiKey() |
|
197 | |||
198 | /** |
||
199 | * Set the API key |
||
200 | * |
||
201 | * @param string $apiKey API key |
||
202 | * |
||
203 | * @return ReportingCloud |
||
204 | */ |
||
205 | 1 | public function setApiKey($apiKey) |
|
211 | |||
212 | /** |
||
213 | * Return the base URI of the backend web service |
||
214 | * |
||
215 | * @return string |
||
216 | */ |
||
217 | 27 | public function getBaseUri() |
|
225 | |||
226 | /** |
||
227 | * Set the base URI of the backend web service |
||
228 | * |
||
229 | * @param string $baseUri Base URI |
||
230 | * |
||
231 | * @return ReportingCloud |
||
232 | */ |
||
233 | 27 | public function setBaseUri($baseUri) |
|
239 | |||
240 | /** |
||
241 | * Get the timeout (in seconds) of the backend web service |
||
242 | * |
||
243 | * @return int |
||
244 | */ |
||
245 | 26 | public function getTimeout() |
|
253 | |||
254 | /** |
||
255 | * Set the timeout (in seconds) of the backend web service |
||
256 | * |
||
257 | * @param int $timeout Timeout |
||
258 | * |
||
259 | * @return ReportingCloud |
||
260 | */ |
||
261 | 26 | public function setTimeout($timeout) |
|
267 | |||
268 | /** |
||
269 | * Return the debug flag |
||
270 | * |
||
271 | * @return mixed |
||
272 | */ |
||
273 | 26 | public function getDebug() |
|
281 | |||
282 | /** |
||
283 | * Set the debug flag |
||
284 | * |
||
285 | * @param bool $debug Debug flag |
||
286 | * |
||
287 | * @return ReportingCloud |
||
288 | */ |
||
289 | 26 | public function setDebug($debug) |
|
295 | |||
296 | /** |
||
297 | * Return the test flag |
||
298 | * |
||
299 | * @return mixed |
||
300 | */ |
||
301 | 24 | public function getTest() |
|
309 | |||
310 | /** |
||
311 | * Set the test flag |
||
312 | * |
||
313 | * @param bool $test Test flag |
||
314 | * |
||
315 | * @return ReportingCloud |
||
316 | */ |
||
317 | 24 | public function setTest($test) |
|
323 | |||
324 | /** |
||
325 | * Get the version string of the backend web service |
||
326 | * |
||
327 | * @return string |
||
328 | */ |
||
329 | 25 | public function getVersion() |
|
337 | |||
338 | /** |
||
339 | * Set the version string of the backend web service |
||
340 | * |
||
341 | * @param string $version Version string |
||
342 | * |
||
343 | * @return ReportingCloud |
||
344 | */ |
||
345 | 2 | public function setVersion($version) |
|
351 | } |
||
352 |