]>
jfr.im git - irc/unrealircd/unrealircd-rpc-php.git/blob - lib/Channel.php
11 public Connection
$connection;
13 public function __construct(Connection
$conn)
15 $this->connection
= $conn;
19 * Return a list of channels users.
24 public function getAll(): stdClass
26 $response = $this->connection
->query('channel.list');
28 if(!is_bool($response)) {
32 throw new Exception('Invalid JSON Response from UnrealIRCd RPC.');
36 * Get a channel object
38 * @param array $params
42 public function get(array $params): stdClass
44 $response = $this->connection
->query('channel.get', ['channel' => $params['channel']]);
46 if (!is_bool($response)) {
50 throw new Exception('Invalid JSON Response from UnrealIRCd RPC.');