1 | <?php |
||
17 | class Client implements ClientInterface |
||
18 | { |
||
19 | /** |
||
20 | * id. |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $id; |
||
25 | |||
26 | /** |
||
27 | * Client information. |
||
28 | * |
||
29 | * @var array |
||
30 | */ |
||
31 | protected $info; |
||
32 | |||
33 | /** |
||
34 | * @var \DateTimeInterface |
||
35 | */ |
||
36 | protected $activeAt; |
||
37 | |||
38 | /** |
||
39 | * @var ConnectionInterface |
||
40 | */ |
||
41 | protected $controlConnection; |
||
42 | |||
43 | public function __construct($info, ConnectionInterface $controlConnection) |
||
49 | |||
50 | /** |
||
51 | * Sets the control connection for the client. |
||
52 | * |
||
53 | * @param ConnectionInterface $controlConnection |
||
54 | */ |
||
55 | public function setControlConnection($controlConnection) |
||
59 | |||
60 | /** |
||
61 | * Gets the control connection of the client. |
||
62 | * |
||
63 | * @return ConnectionInterface |
||
64 | */ |
||
65 | public function getControlConnection() |
||
69 | |||
70 | /** |
||
71 | * {@inheritdoc} |
||
72 | */ |
||
73 | public function getId() |
||
77 | |||
78 | /** |
||
79 | * {@inheritdoc} |
||
80 | */ |
||
81 | public function setId($id) |
||
85 | |||
86 | /** |
||
87 | * Close the client. |
||
88 | */ |
||
89 | public function close() |
||
93 | |||
94 | /** |
||
95 | * {@inheritdoc} |
||
96 | */ |
||
97 | public function setActiveAt($activeAt) |
||
101 | |||
102 | /** |
||
103 | * {@inheritdoc} |
||
104 | */ |
||
105 | public function getActiveAt() |
||
109 | |||
110 | /** |
||
111 | * Gets the client information. |
||
112 | * |
||
113 | * @return array |
||
114 | */ |
||
115 | public function toArray() |
||
121 | } |