* @package timwolla.wcf.chat * @subpackage data.chat.room */ class ChatRoom extends \wcf\data\DatabaseObject implements \wcf\system\request\IRouteController { /** * @see wcf\data\DatabaseObject::$databaseTableName */ protected static $databaseTableName = 'chat_room'; /** * @see wcf\data\DatabaseObject::$databaseTableIndexName */ protected static $databaseTableIndexName = 'roomID'; /** * Caches rooms. * * @var array */ protected static $cache = null; /** * Loads the room cache. */ public static function getCache() { if (self::$cache === null) { CacheHandler::getInstance()->addResource( 'chatrooms', WCF_DIR.'cache/cache.chatrooms.php', 'wcf\system\cache\builder\ChatRoomCacheBuilder' ); self::$cache = CacheHandler::getInstance()->get('chatrooms'); } return self::$cache; } /** * @see \wcf\data\chat\room\ChatRoom::getTitle(); */ public function __tostring() { return $this->getTitle; } /** * Returns the name of this chat-room. * * @see \wcf\system\request\IRouteController */ public function getTitle() { return $this->title; } /** * Returns the ID of this chat-room. * * @see \wcf\system\request\RRouteHandler */ public function getID() { return $this->roomID; } }