]>
Commit | Line | Data |
---|---|---|
1ef2e09f BM |
1 | <?php |
2 | ||
3 | namespace UnrealIRCd; | |
4 | ||
5 | use Exception; | |
6 | use stdClass; | |
7 | ||
8 | class Stats | |
9 | { | |
10 | ||
11 | public Connection $connection; | |
12 | ||
13 | public function __construct(Connection $conn) | |
14 | { | |
15 | $this->connection = $conn; | |
16 | } | |
17 | ||
18 | /** | |
19 | * Get basic statistical information: user counts, channel counts, etc. | |
20 | * | |
21 | * @return stdClass|array|bool | |
22 | */ | |
23 | public function get(int $object_detail_level=1): stdClass|array|bool | |
24 | { | |
1fa5515c | 25 | return $this->connection->query('stats.get', [ |
1ef2e09f BM |
26 | 'object_detail_level' => $object_detail_level, |
27 | ]); | |
28 | } | |
29 | } |