1 | <?php |
||
13 | class Instance implements \JsonSerializable |
||
14 | { |
||
15 | |||
16 | /** |
||
17 | * @var string the name of the instance |
||
18 | */ |
||
19 | private $_name; |
||
20 | |||
21 | /** |
||
22 | * @var array the names of users whose subscriptions should be ignored |
||
23 | */ |
||
24 | private $_ignoredUsers; |
||
25 | |||
26 | /** |
||
27 | * @var Tvheadend the actual tvheadend instance |
||
28 | */ |
||
29 | private $_instance; |
||
30 | |||
31 | |||
32 | /** |
||
33 | * Instance constructor. |
||
34 | * |
||
35 | * @param string $name |
||
36 | * @param string $address |
||
37 | * @param int $port |
||
38 | */ |
||
39 | 1 | public function __construct($name, $address, $port) |
|
47 | |||
48 | |||
49 | /** |
||
50 | * @return string |
||
51 | */ |
||
52 | 2 | public function getName() |
|
56 | |||
57 | |||
58 | /** |
||
59 | * @return array |
||
60 | */ |
||
61 | 1 | public function getIgnoredUsers() |
|
65 | |||
66 | |||
67 | /** |
||
68 | * @param array $ignoredUsers |
||
69 | */ |
||
70 | public function setIgnoredUsers($ignoredUsers) |
||
74 | |||
75 | |||
76 | /** |
||
77 | * Sets the credentials to use |
||
78 | * |
||
79 | * @param $username |
||
80 | * @param $password |
||
81 | */ |
||
82 | public function setCredentials($username, $password) |
||
86 | |||
87 | |||
88 | /** |
||
89 | * @return Tvheadend |
||
90 | */ |
||
91 | public function getInstance() |
||
95 | |||
96 | |||
97 | /** |
||
98 | * @inheritdoc |
||
99 | */ |
||
100 | public function jsonSerialize() |
||
106 | |||
107 | } |
||
108 |