1 | <?php declare(strict_types=1); |
||
10 | class ServerStats |
||
11 | { |
||
12 | private $stats; |
||
13 | |||
14 | /** |
||
15 | * ServerStats constructor. |
||
16 | * |
||
17 | * @param array $stats |
||
18 | */ |
||
19 | 2 | public function __construct(array $stats) |
|
23 | |||
24 | /** |
||
25 | * Returns the timestamp of server since start |
||
26 | * |
||
27 | * @return int |
||
28 | */ |
||
29 | 1 | public function getStartTime(): int |
|
33 | |||
34 | /** |
||
35 | * Returns the number of current connections |
||
36 | * |
||
37 | * @return int |
||
38 | */ |
||
39 | 1 | public function getConnections(): int |
|
43 | |||
44 | /** |
||
45 | * Returns the number of accepted connections |
||
46 | * |
||
47 | * @return int |
||
48 | */ |
||
49 | 1 | public function getAcceptedConnections(): int |
|
53 | |||
54 | /** |
||
55 | * Returns the number of closed connections |
||
56 | * |
||
57 | * @return int |
||
58 | */ |
||
59 | 1 | public function getClosedConnections(): int |
|
63 | |||
64 | /** |
||
65 | * Returns the number of received requests |
||
66 | * |
||
67 | * @return int |
||
68 | */ |
||
69 | 1 | public function getReceivedRequests(): int |
|
73 | } |
||
74 |