| ILIAS
    release_5-2 Revision v5.2.25-18-g3f80b828510
    | 
Class ilChatroom. More...
 Collaboration diagram for ilChatroom:
 Collaboration diagram for ilChatroom:| Public Member Functions | |
| initialize (array $rowdata) | |
| Sets $this->roomId by given array $rowdata and calls setSetting method foreach available setting in $this->availableSettings.  More... | |
| setSetting ($name, $value) | |
| Sets given name and value as setting into $this->settings array.  More... | |
| getDescription () | |
| getSetting ($name) | |
| Returns setting from $this->settings array by given name.  More... | |
| save () | |
| Saves settings using $this->settings.  More... | |
| saveSettings (array $settings) | |
| Saves settings into settingsTable using given settings array.  More... | |
| addHistoryEntry ($message, $recipient=null, $publicMessage=true) | |
| Inserts entry into historyTable.  More... | |
| getConnectedUsers () | |
| Returns an array of connected users.  More... | |
| disconnectUser ($user_id) | |
| Creates userId array by given $user object and calls disconnectUsers method.  More... | |
| disconnectUsers (array $userIds) | |
| Disconnects users by deleting userdata from userTable using given userId array.  More... | |
| getSettings () | |
| Returns $this->settings array.  More... | |
| isSubscribed ($chat_userid) | |
| Returns true if entry exists in userTable matching given $chat_userid and $this->roomId.  More... | |
| isAllowedToEnterPrivateRoom ($chat_userid, $proom_id) | |
| getHistory (ilDateTime $from=null, ilDateTime $to=null, $restricted_session_userid=null, $proom_id=0) | |
| Returns array containing history data selected from historyTable by given ilDateTime, $restricted_session_userid and matching roomId.  More... | |
| getRoomId () | |
| Returns roomID from $this->roomId.  More... | |
| getPrivateRoomSessions (ilDateTime $from=null, ilDateTime $to=null, $user_id=0, $room_id=0) | |
| saveFileUploadToDb ($user_id, $filename, $type) | |
| Saves information about file uploads in DB.  More... | |
| banUser ($user_id, $comment='') | |
| Inserts user into banTable, using given $user_id @global ilDBInterface $ilDB.  More... | |
| unbanUser ($user_id) | |
| Deletes entry from banTable matching roomId and given $user_id and returns true if sucessful.  More... | |
| isUserBanned ($user_id) | |
| Returns true if there's an entry in banTable matching roomId and given $user_id @global ilDBInterface $ilDB.  More... | |
| getBannedUsers () | |
| Returns an multidimensional array containing userdata from users having an entry in banTable with matching roomId.  More... | |
| getLastSession (ilChatroomUser $user) | |
| Returns last session from user.  More... | |
| getSessions (ilChatroomUser $user) | |
| Returns all session from user Returns all from sessionTable where user_id matches userId from given $user object.  More... | |
| addPrivateRoom ($title, ilChatroomUser $owner, $settings) | |
| closePrivateRoom ($id) | |
| isOwnerOfPrivateRoom ($user_id, $proom_id) | |
| getChatURL ($gui, $scope_id=0) | |
| @global ilCtrl $ilCtrl  More... | |
| getTitle () | |
| inviteUserToPrivateRoomByLogin ($login, $proom_id) | |
| getActivePrivateRooms ($userid) | |
| listUsersInPrivateRoom ($private_room_id) | |
| subscribeUserToPrivateRoom ($room_id, $user_id) | |
| userIsInPrivateRoom ($room_id, $user_id) | |
| unsubscribeUserFromPrivateRoom ($room_id, $user_id) | |
| @global ilDBInterface $ilDB  More... | |
| countActiveUsers () | |
| getUniquePrivateRoomTitle ($title) | |
| getPrivateSubRooms ($parent_room, $user_id) | |
| getRefIdByRoomId ($room_id) | |
| Returns ref_id of given room_id @global ilDBInterface $ilDB.  More... | |
| getLastMessagesForChatViewer ($number, $chatuser=null) | |
| getLastMessages ($number, $chatuser=null) | |
| clearMessages ($sub_room) | |
| Static Public Member Functions | |
| static | checkUserPermissions ($permissions, $ref_id, $send_info=true) | 
| Checks user permissions by given array and ref_id.  More... | |
| static | checkPermissionsOfUser ($usr_id, $permissions, $ref_id) | 
| Checks user permissions in question for a given user id in relation to a given ref_id.  More... | |
| static | byObjectId ($object_id) | 
| Returns ilChatroom object by given $object_id.  More... | |
| static | byRoomId ($room_id, $initObject=false) | 
| Returns ilChatroom by given $room_id @global ilDBInterface $ilDB.  More... | |
| static | disconnectAllUsersFromAllRooms () | 
| Deletes all entrys from userTable.  More... | |
| static | findDeletablePrivateRooms () | 
| static | lookupPrivateRoomTitle ($proom_id) | 
| Private Member Functions | |
| phpTypeToMDBType ($type) | |
| Private Attributes | |
| $settings = array() | |
| $availableSettings | |
| $roomId | |
| $object | |
| Static Private Attributes | |
| static | $settingsTable = 'chatroom_settings' | 
| static | $historyTable = 'chatroom_history' | 
| static | $userTable = 'chatroom_users' | 
| static | $sessionTable = 'chatroom_sessions' | 
| static | $banTable = 'chatroom_bans' | 
| static | $privateRoomsTable = 'chatroom_prooms' | 
| static | $privateSessionsTable = 'chatroom_psessions' | 
| static | $uploadTable = 'chatroom_uploads' | 
| static | $privateRoomsAccessTable = 'chatroom_proomaccess' | 
| ilChatroom::addHistoryEntry | ( | $message, | |
| $recipient = null, | |||
| $publicMessage = true | |||
| ) | 
Inserts entry into historyTable.
| string | $message | |
| string | $recipient | |
| boolean | $publicMessage | 
Definition at line 387 of file class.ilChatroom.php.
References $ilDB.
| ilChatroom::addPrivateRoom | ( | $title, | |
| ilChatroomUser | $owner, | ||
| $settings | |||
| ) | 
Definition at line 922 of file class.ilChatroom.php.
References $ilDB, $settings, $title, and ilChatroomUser\getUserId().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilChatroom::banUser | ( | $user_id, | |
| $comment = '' | |||
| ) | 
Inserts user into banTable, using given $user_id @global ilDBInterface $ilDB.
| integer | $user_id | |
| string | $comment | 
Definition at line 758 of file class.ilChatroom.php.
| 
 | static | 
Returns ilChatroom object by given $object_id.
@global ilDBInterface $ilDB
| integer | $object_id | 
Definition at line 110 of file class.ilChatroom.php.
References $ilDB, $query, and $row.
Referenced by ilChatroomBanGUI\active(), ilChatroomServerHandler\cleanupPrivateRooms(), ilChatroomPrivateRoomGUI\create(), ilChatroomPrivateRoomGUI\delete(), ilChatroomPrivateRoomGUI\enter(), ilChatroomInitialGUI\executeDefault(), ilChatroomKickGUI\executeDefault(), ilChatroomPostMessageGUI\executeDefault(), ilChatroomGUIHandler\getRoomByObjectId(), ilChatroomInviteUsersToPrivateRoomGUI\inviteById(), ilChatroomPrivateRoomGUI\leave(), ilChatroomPrivateRoomGUI\listUsers(), ilChatroomKickGUI\main(), ilChatroomKickGUI\sub(), and ilChatroomUploadFileGUI\uploadFile().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Returns ilChatroom by given $room_id @global ilDBInterface $ilDB.
| integer | $room_id | 
Definition at line 161 of file class.ilChatroom.php.
References $ilDB, $query, $row, and ilObjectFactory\getInstanceByObjId().
Referenced by ilChatroomServerHandler\disconnectedUsers(), and ilContactGUI\submitInvitation().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Checks user permissions in question for a given user id in relation to a given ref_id.
@global ilRbacSystem $rbacsystem @global ilLanguage $lng
| integer | $usr_id | |
| mixed | $permissions | |
| integer | $ref_id | 
Definition at line 84 of file class.ilChatroom.php.
Referenced by ilChatroomKickGUI\sub(), and ilContactGUI\submitInvitation().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Checks user permissions by given array and ref_id.
@global Rbacsystem $rbacsystem
| mixed | $permissions | |
| integer | $ref_id | 
Definition at line 50 of file class.ilChatroom.php.
References $lng, $ref_id, and ilUtil\sendFailure().
Referenced by ilChatroomAdminViewGUI\clientsettings(), ilChatroomPrivateRoomGUI\enter(), ilChatroomPostMessageGUI\executeDefault(), ilChatroomGUIHandler\redirectIfNoPermission(), ilChatroomAdminViewGUI\serversettings(), ilChatroomUploadFileGUI\uploadFile(), and ilChatroomAdminSmileyGUI\view().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilChatroom::clearMessages | ( | $sub_room | ) | 
Definition at line 1467 of file class.ilChatroom.php.
References $ilDB.
| ilChatroom::closePrivateRoom | ( | $id | ) | 
Definition at line 942 of file class.ilChatroom.php.
References $ilDB.
| ilChatroom::countActiveUsers | ( | ) | 
Definition at line 1238 of file class.ilChatroom.php.
| 
 | static | 
Deletes all entrys from userTable.
@global ilDBInterface $ilDB
Definition at line 190 of file class.ilChatroom.php.
References $ilDB.
Referenced by ilChatroomServerHandler\serverStarted().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilChatroom::disconnectUser | ( | $user_id | ) | 
Creates userId array by given $user object and calls disconnectUsers method.
| int | $user_id | 
Definition at line 492 of file class.ilChatroom.php.
References disconnectUsers().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilChatroom::disconnectUsers | ( | array | $userIds | ) | 
Disconnects users by deleting userdata from userTable using given userId array.
Deletes entrys from userTable, matching roomId and userId if existing and inserts userdata and disconnection time into sessionTable. @global ilDBInterface $ilDB
| array | $userIds | 
Definition at line 504 of file class.ilChatroom.php.
References $ilDB, $query, $row, and getSetting().
Referenced by disconnectUser().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Definition at line 202 of file class.ilChatroom.php.
References $ilDB, $query, and $row.
Referenced by ilChatroomServerHandler\cleanupPrivateRooms().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilChatroom::getActivePrivateRooms | ( | $userid | ) | 
Definition at line 1134 of file class.ilChatroom.php.
References $ilDB, $query, $row, and listUsersInPrivateRoom().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilChatroom::getBannedUsers | ( | ) | 
Returns an multidimensional array containing userdata from users having an entry in banTable with matching roomId.
@global ilDBInterface $ilDB
Definition at line 831 of file class.ilChatroom.php.
References $ilDB, $query, $result, $row, and getRoomId().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilChatroom::getChatURL | ( | $gui, | |
| $scope_id = 0 | |||
| ) | 
@global ilCtrl $ilCtrl
| <type> | $gui | 
| <type> | $scope_id | 
Definition at line 1055 of file class.ilChatroom.php.
References $url, and ilLink\_getStaticLink().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilChatroom::getConnectedUsers | ( | ) | 
Returns an array of connected users.
Returns an array of user objects containing all users having an entry in userTable, matching the roomId. @global ilDBInterface $ilDB
Definition at line 469 of file class.ilChatroom.php.
| ilChatroom::getDescription | ( | ) | 
Definition at line 291 of file class.ilChatroom.php.
References ilObjectFactory\getInstanceByObjId(), and getSetting().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilChatroom::getHistory | ( | ilDateTime | $from = null, | 
| ilDateTime | $to = null, | ||
| $restricted_session_userid = null, | |||
| $proom_id = 0 | |||
| ) | 
Returns array containing history data selected from historyTable by given ilDateTime, $restricted_session_userid and matching roomId.
@global ilDBInterface $ilDB
| ilDateTime | $from | |
| ilDateTime | $to | |
| integer | $restricted_session_userid | 
Definition at line 638 of file class.ilChatroom.php.
References $ilDB, $ilUser, $query, $result, $row, and getRoomId().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilChatroom::getLastMessages | ( | $number, | |
| $chatuser = null | |||
| ) | 
Definition at line 1397 of file class.ilChatroom.php.
References $ilDB, $results, and $row.
Referenced by getLastMessagesForChatViewer().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilChatroom::getLastMessagesForChatViewer | ( | $number, | |
| $chatuser = null | |||
| ) | 
Definition at line 1392 of file class.ilChatroom.php.
References getLastMessages().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilChatroom::getLastSession | ( | ilChatroomUser | $user | ) | 
Returns last session from user.
Returns row from sessionTable where user_id matches userId from given $user object. @global ilDBInterface $ilDB
| ilChatroomUser | $user | 
Definition at line 876 of file class.ilChatroom.php.
References $ilDB, $query, $row, and ilChatroomUser\getUserId().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilChatroom::getPrivateRoomSessions | ( | ilDateTime | $from = null, | 
| ilDateTime | $to = null, | ||
| $user_id = 0, | |||
| $room_id = 0 | |||
| ) | 
Definition at line 708 of file class.ilChatroom.php.
| ilChatroom::getPrivateSubRooms | ( | $parent_room, | |
| $user_id | |||
| ) | 
Definition at line 1331 of file class.ilChatroom.php.
| ilChatroom::getRefIdByRoomId | ( | $room_id | ) | 
Returns ref_id of given room_id @global ilDBInterface $ilDB.
| integer | $room_id | 
Definition at line 1365 of file class.ilChatroom.php.
| ilChatroom::getRoomId | ( | ) | 
Returns roomID from $this->roomId.
Definition at line 703 of file class.ilChatroom.php.
References $roomId.
Referenced by getBannedUsers(), getHistory(), getSessions(), isUserBanned(), and unbanUser().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilChatroom::getSessions | ( | ilChatroomUser | $user | ) | 
Returns all session from user Returns all from sessionTable where user_id matches userId from given $user object.
@global ilDBInterface $ilDB
| ilChatroomUser | $user | 
Definition at line 901 of file class.ilChatroom.php.
References $ilDB, $query, $result, $row, and getRoomId().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilChatroom::getSetting | ( | $name | ) | 
Returns setting from $this->settings array by given name.
| string | $name | 
Definition at line 306 of file class.ilChatroom.php.
References settings().
Referenced by disconnectUsers(), getDescription(), and getTitle().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilChatroom::getSettings | ( | ) | 
Returns $this->settings array.
Definition at line 572 of file class.ilChatroom.php.
References $settings.
| ilChatroom::getTitle | ( | ) | 
Definition at line 1076 of file class.ilChatroom.php.
References ilObjectFactory\getInstanceByObjId(), and getSetting().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilChatroom::getUniquePrivateRoomTitle | ( | $title | ) | 
Definition at line 1255 of file class.ilChatroom.php.
| ilChatroom::initialize | ( | array | $rowdata | ) | 
Sets $this->roomId by given array $rowdata and calls setSetting method foreach available setting in $this->availableSettings.
| array | $rowdata | 
Definition at line 131 of file class.ilChatroom.php.
References setSetting().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilChatroom::inviteUserToPrivateRoomByLogin | ( | $login, | |
| $proom_id | |||
| ) | 
Definition at line 1104 of file class.ilChatroom.php.
References $ilDB, and ilObjUser\_lookupId().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilChatroom::isAllowedToEnterPrivateRoom | ( | $chat_userid, | |
| $proom_id | |||
| ) | 
Definition at line 601 of file class.ilChatroom.php.
| ilChatroom::isOwnerOfPrivateRoom | ( | $user_id, | |
| $proom_id | |||
| ) | 
Definition at line 953 of file class.ilChatroom.php.
| ilChatroom::isSubscribed | ( | $chat_userid | ) | 
Returns true if entry exists in userTable matching given $chat_userid and $this->roomId.
@global ilDBInterface $ilDB
| integer | $chat_userid | 
Definition at line 584 of file class.ilChatroom.php.
| ilChatroom::isUserBanned | ( | $user_id | ) | 
Returns true if there's an entry in banTable matching roomId and given $user_id @global ilDBInterface $ilDB.
| integer | $user_id | 
Definition at line 806 of file class.ilChatroom.php.
References $ilDB, $query, $row, and getRoomId().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilChatroom::listUsersInPrivateRoom | ( | $private_room_id | ) | 
Definition at line 1162 of file class.ilChatroom.php.
References $ilDB, $query, and $row.
Referenced by getActivePrivateRooms().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Definition at line 1086 of file class.ilChatroom.php.
References $ilDB, $query, and $row.
Referenced by ilContactGUI\inviteToChat().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Definition at line 367 of file class.ilChatroom.php.
Referenced by saveSettings().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilChatroom::save | ( | ) | 
Saves settings using $this->settings.
Definition at line 314 of file class.ilChatroom.php.
References saveSettings(), and settings().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilChatroom::saveFileUploadToDb | ( | $user_id, | |
| $filename, | |||
| $type | |||
| ) | 
Saves information about file uploads in DB.
@global ilDBInterface $ilDB
| integer | $user_id | |
| string | $filename | |
| string | $type | 
Definition at line 733 of file class.ilChatroom.php.
| ilChatroom::saveSettings | ( | array | $settings | ) | 
Saves settings into settingsTable using given settings array.
@global ilDBInterface $ilDB
| array | $settings | 
Definition at line 324 of file class.ilChatroom.php.
References $ilDB, $settings, and phpTypeToMDBType().
Referenced by save().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilChatroom::setSetting | ( | $name, | |
| $value | |||
| ) | 
Sets given name and value as setting into $this->settings array.
| string | $name | |
| mixed | $value | 
Definition at line 150 of file class.ilChatroom.php.
References settings().
Referenced by initialize().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilChatroom::subscribeUserToPrivateRoom | ( | $room_id, | |
| $user_id | |||
| ) | 
Definition at line 1184 of file class.ilChatroom.php.
References $ilDB, and userIsInPrivateRoom().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilChatroom::unbanUser | ( | $user_id | ) | 
Deletes entry from banTable matching roomId and given $user_id and returns true if sucessful.
@global ilDBInterface $ilDB
| mixed | $user_id | 
Definition at line 782 of file class.ilChatroom.php.
References $ilDB, $query, and getRoomId().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilChatroom::unsubscribeUserFromPrivateRoom | ( | $room_id, | |
| $user_id | |||
| ) | 
@global ilDBInterface $ilDB
| integer | $room_id | |
| integer | $user_id | 
Definition at line 1222 of file class.ilChatroom.php.
References $ilDB.
| ilChatroom::userIsInPrivateRoom | ( | $room_id, | |
| $user_id | |||
| ) | 
Definition at line 1204 of file class.ilChatroom.php.
Referenced by subscribeUserToPrivateRoom().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Definition at line 28 of file class.ilChatroom.php.
| 
 | staticprivate | 
Definition at line 16 of file class.ilChatroom.php.
| 
 | staticprivate | 
Definition at line 13 of file class.ilChatroom.php.
| 
 | private | 
Definition at line 42 of file class.ilChatroom.php.
| 
 | staticprivate | 
Definition at line 20 of file class.ilChatroom.php.
| 
 | staticprivate | 
Definition at line 17 of file class.ilChatroom.php.
| 
 | staticprivate | 
Definition at line 18 of file class.ilChatroom.php.
| 
 | private | 
Definition at line 40 of file class.ilChatroom.php.
Referenced by getRoomId().
| 
 | staticprivate | 
Definition at line 15 of file class.ilChatroom.php.
| 
 | private | 
Definition at line 21 of file class.ilChatroom.php.
Referenced by addPrivateRoom(), getSettings(), and saveSettings().
| 
 | staticprivate | 
Definition at line 12 of file class.ilChatroom.php.
| 
 | staticprivate | 
Definition at line 19 of file class.ilChatroom.php.
| 
 | staticprivate | 
Definition at line 14 of file class.ilChatroom.php.