]> jfr.im git - irc/unrealircd/unrealircd-rpc-php.git/blob - lib/Stats.php
$rpc->log()->getAll() now has a $sources argument which allows you
[irc/unrealircd/unrealircd-rpc-php.git] / lib / Stats.php
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 {
25 return $this->connection->query('stats.get', [
26 'object_detail_level' => $object_detail_level,
27 ]);
28 }
29 }