1 | <?php |
||
9 | class Client |
||
10 | { |
||
11 | |||
12 | /** |
||
13 | * @var TransportInterface |
||
14 | */ |
||
15 | protected $transport; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $client_id; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $redirect_uri; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $client_secret; |
||
31 | |||
32 | /** |
||
33 | * @var bool |
||
34 | */ |
||
35 | protected $force_relogin; |
||
36 | |||
37 | /** |
||
38 | * @var string |
||
39 | */ |
||
40 | protected $access_token; |
||
41 | |||
42 | /* |
||
43 | * @var string |
||
44 | */ |
||
45 | protected $api_url; |
||
46 | |||
47 | // --- NEW -- |
||
48 | |||
49 | /** |
||
50 | * @var array |
||
51 | */ |
||
52 | protected $resources = []; |
||
53 | |||
54 | /** |
||
55 | * @var Resource\Auth |
||
56 | */ |
||
57 | public $auth; |
||
58 | |||
59 | /** |
||
60 | * @var Resource\Game |
||
61 | */ |
||
62 | public $games; |
||
63 | |||
64 | /** |
||
65 | * @var Resource\Root |
||
66 | */ |
||
67 | public $root; |
||
68 | |||
69 | /** |
||
70 | * @var Resource\Teams |
||
71 | */ |
||
72 | public $teams; |
||
73 | |||
74 | /** |
||
75 | * @var Resource\Videos |
||
76 | */ |
||
77 | public $videos; |
||
78 | |||
79 | /** |
||
80 | * @var Resource\Ingests |
||
81 | */ |
||
82 | public $ingests; |
||
83 | |||
84 | public function __construct() |
||
257 | |||
258 | public function registerResource($name="", Resource\ResourceAbstract $instance) { |
||
261 | |||
262 | public function getSupportedFunctions() { |
||
265 | |||
266 | /* -- Setters */ |
||
267 | |||
268 | /** |
||
269 | * @param string $client_id |
||
270 | */ |
||
271 | public function setClientId($client_id) |
||
276 | |||
277 | /** |
||
278 | * @param string $redirect_uri |
||
279 | */ |
||
280 | public function setRedirectUri($redirect_uri) |
||
285 | |||
286 | /** |
||
287 | * @param string $client_secret |
||
288 | */ |
||
289 | public function setClientSecret($client_secret) |
||
294 | |||
295 | /** |
||
296 | * @param string $api_url |
||
297 | */ |
||
298 | public function setApiUrl($api_url) |
||
303 | |||
304 | /** |
||
305 | * @param boolean $force_relogin |
||
306 | */ |
||
307 | public function setForceRelogin($force_relogin) |
||
312 | |||
313 | /** |
||
314 | * @param string $access_token |
||
315 | */ |
||
316 | public function setAccessToken($access_token) |
||
320 | |||
321 | |||
322 | /* -- Getters */ |
||
323 | |||
324 | /** |
||
325 | * @return string |
||
326 | */ |
||
327 | public function getClientId() |
||
331 | |||
332 | /** |
||
333 | * @return string |
||
334 | */ |
||
335 | public function getRedirectUri() |
||
339 | |||
340 | /** |
||
341 | * @return string |
||
342 | */ |
||
343 | public function getClientSecret() |
||
347 | |||
348 | /** |
||
349 | * @return string |
||
350 | */ |
||
351 | public function getApiUrl() |
||
355 | |||
356 | /** |
||
357 | * @return boolean |
||
358 | */ |
||
359 | public function isForceRelogin() |
||
363 | |||
364 | /** |
||
365 | * @return string |
||
366 | */ |
||
367 | public function getAccessToken() |
||
371 | |||
372 | public function getAuthModel() { |
||
375 | |||
376 | /** |
||
377 | * Send command to server |
||
378 | * |
||
379 | * @param CommandInterface $command Phue command |
||
380 | * |
||
381 | * @return mixed Command result |
||
382 | */ |
||
383 | public function sendCommand(Commands\CommandInterface $command) |
||
387 | |||
388 | /** |
||
389 | * Get transport |
||
390 | * |
||
391 | * @return TransportInterface Transport |
||
392 | */ |
||
393 | public function getTransport() |
||
401 | |||
402 | /** |
||
403 | * Set transport |
||
404 | * |
||
405 | * @param TransportInterface $transport Transport |
||
406 | * |
||
407 | * @return self This object |
||
408 | */ |
||
409 | public function setTransport(TransportInterface $transport) |
||
414 | |||
415 | } |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..