Function __global->get_chatroom_id

Definitions

sources/chat.php

  • Get the ID of the specified chatroom, from its room name.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: int

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$room_name SHORT_TEXT No No required parameter N/A N/A The name of the chatroom
$must_not_be_im boolean No No False N/A N/A Make sure the room is not an IM room. If it is an IM room, pretend it does not exist.

Returns

  • The ID of the chatroom (null: no such chatroom)
  • Type: ?AUTO_LINK
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get the ID of the specified chatroom, from its room name.
 *
 * @param  SHORT_TEXT $room_name The name of the chatroom
 * @param  boolean $must_not_be_im Make sure the room is not an IM room. If it is an IM room, pretend it does not exist.
 * @return ?AUTO_LINK The ID of the chatroom (null: no such chatroom)
 */

function get_chatroom_id(string $room_name, bool $must_not_be_im = false) : ?int