]> jfr.im git - irc/unrealircd/unrealircd-rpc-php.git/blame - lib/Stats.php
Return from $rpc->eventloop() after 2 seconds instead of 10.
[irc/unrealircd/unrealircd-rpc-php.git] / lib / Stats.php
CommitLineData
1ef2e09f
BM
1<?php
2
3namespace UnrealIRCd;
4
5use Exception;
6use stdClass;
7
8class 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}