1 | <?php declare(strict_types=1); |
||
10 | class ClientInfo |
||
11 | { |
||
12 | private $stats; |
||
13 | |||
14 | /** |
||
15 | * ClientStats constructor. |
||
16 | * |
||
17 | * @param array $stats |
||
18 | */ |
||
19 | 5 | public function __construct(array $stats) |
|
23 | |||
24 | /** |
||
25 | * Returns port used by client to connect to the server. |
||
26 | * |
||
27 | * @return int |
||
28 | */ |
||
29 | 2 | public function getPort(): int |
|
33 | |||
34 | /** |
||
35 | * Returns client's ip. |
||
36 | * |
||
37 | * @return string |
||
38 | */ |
||
39 | 1 | public function getIp(): string |
|
43 | |||
44 | /** |
||
45 | * Returns unix timestamp when connection happened. |
||
46 | * |
||
47 | * @return int |
||
48 | */ |
||
49 | 1 | public function getConnectTime(): int |
|
53 | } |
||
54 |