|
ILIAS
Release_5_0_x_branch Revision 61816
|
Class ilChatroom. More...
Collaboration diagram for ilChatroom:Public Member Functions | |
| getTitle () | |
| getDescription () | |
| getSetting ($name) | |
| Returns setting from $this->settings array by given name. | |
| setSetting ($name, $value) | |
| Sets given name and value as setting into $this->settings array. | |
| save () | |
| Saves settings using $this->settings. | |
| addHistoryEntry ($message, $recipient=null, $publicMessage=true) | |
| Inserts entry into historyTable. | |
| getConnectedUsers () | |
| Returns an array of connected users. | |
| disconnectUser ($user_id) | |
| Creates userId array by given $user object and calls disconnectUsers method. | |
| disconnectUsers (array $userIds) | |
| Disconnects users by deleting userdata from userTable using given userId array. | |
| saveSettings (array $settings) | |
| Saves settings into settingsTable using given settings array. | |
| getSettings () | |
| Returns $this->settings array. | |
| initialize (array $rowdata) | |
| Sets $this->roomId by given array $rowdata and calls setSetting method foreach available setting in $this->availableSettings. | |
| getRoomId () | |
| Returns roomID from $this->roomId. | |
| isSubscribed ($chat_userid) | |
| Returns true if entry exists in userTable matching given $chat_userid and $this->roomId. | |
| isAllowedToEnterPrivateRoom ($chat_userid, $proom_id) | |
| disconnectAllUsersFromAllRooms () | |
| Deletes all entrys from userTable. | |
| 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. | |
| 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. | |
| banUser ($user_id, $comment= '') | |
| Inserts user into banTable, using given $user_id. | |
| unbanUser ($user_id) | |
| Deletes entry from banTable matching roomId and given $user_id and returns true if sucessful. | |
| isUserBanned ($user_id) | |
| Returns true if there's an entry in banTable matching roomId and given $user_id. | |
| getBannedUsers () | |
| Returns an multidimensional array containing userdata from users having an entry in banTable with matching roomId. | |
| getLastSession (ilChatroomUser $user) | |
| Returns last session from user. | |
| getSessions (ilChatroomUser $user) | |
| Returns all session from user. | |
| addPrivateRoom ($title, ilChatroomUser $owner, $settings) | |
| closePrivateRoom ($id) | |
| isOwnerOfPrivateRoom ($user_id, $proom_id) | |
| getChatURL ($gui, $scope_id=0) | |
| ilCtrl $ilCtrl | |
| inviteUserToPrivateRoomByLogin ($login, $proom_id) | |
| getActivePrivateRooms ($userid) | |
| listUsersInPrivateRoom ($private_room_id) | |
| userIsInPrivateRoom ($room_id, $user_id) | |
| subscribeUserToPrivateRoom ($room_id, $user_id) | |
| unsubscribeUserFromPrivateRoom ($room_id, $user_id) | |
| ilDB $ilDB | |
| countActiveUsers () | |
| getUniquePrivateRoomTitle ($title) | |
| getPrivateSubRooms ($parent_room, $user_id) | |
| getRefIdByRoomId ($room_id) | |
| Returns ref_id of given room_id. | |
| 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. | |
| static | checkPermissionsOfUser ($usr_id, $permissions, $ref_id) |
| Checks user permissions in question for a given user id in relation to a given ref_id. | |
| static | byObjectId ($object_id) |
| Returns ilChatroom object by given $object_id. | |
| static | byRoomId ($room_id, $initObject=false) |
| Returns ilChatroom by given $room_id. | |
| static | lookupPrivateRoomTitle ($proom_id) |
| static | findDeletablePrivateRooms () |
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.
ilDBMySQL $ilDB
| string | $message | |
| string | $recipient | |
| boolean | $publicMessage |
Definition at line 171 of file class.ilChatroom.php.
References $ilDB.
| ilChatroom::addPrivateRoom | ( | $title, | |
| ilChatroomUser | $owner, | ||
| $settings | |||
| ) |
Definition at line 844 of file class.ilChatroom.php.
References $ilDB, $settings, and ilChatroomUser\getUserId().
Referenced by ilChatroomServerConnector\createPrivateRoom().
Here is the call graph for this function:
Here is the caller graph for this function:| ilChatroom::banUser | ( | $user_id, | |
$comment = '' |
|||
| ) |
Inserts user into banTable, using given $user_id.
ilDBMySQL $ilDB
| integer | $user_id | |
| string | $comment |
Definition at line 677 of file class.ilChatroom.php.
|
static |
Returns ilChatroom object by given $object_id.
ilDBMySQL $ilDB
| integer | $object_id |
Definition at line 422 of file class.ilChatroom.php.
Referenced by ilChatroomBanTask\active(), ilChatroomHistoryTask\byDay(), ilChatroomHistoryTask\bySession(), ilChatroomServerHandler\cleanupPrivateRooms(), ilObjChatroom\cloneObject(), ilChatroomPrivateRoomTask\create(), ilChatroomPrivateRoomTask\delete(), ilChatroomPrivateRoomTask\enter(), ilChatroomInitialTask\executeDefault(), ilChatroomClearTask\executeDefault(), ilChatroomPostMessageTask\executeDefault(), ilChatroomPrivateRoomTask\leave(), ilChatroomPrivateRoomTask\listUsers(), ilChatroomBanTask\show(), ilChatroomHistoryTask\showMessages(), ilChatroomKickTask\sub(), and ilChatroomUploadFileTask\uploadFile().
Here is the caller graph for this function:
|
static |
Returns ilChatroom by given $room_id.
ilDBMySQL $ilDB
| integer | $room_id |
Definition at line 445 of file class.ilChatroom.php.
References $ilDB, $row, and ilObjectFactory\getInstanceByObjId().
Referenced by ilChatroomServerHandler\disconnectedUsers().
Here is the call 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.
ilRbacSystem $rbacsystem ilLanguage $lng
| integer | $usr_id | |
| mixed | $permissions | |
| integer | $ref_id |
Definition at line 101 of file class.ilChatroom.php.
Referenced by ilChatroomKickTask\sub().
Here is the caller graph for this function:
|
static |
Checks user permissions by given array and ref_id.
Rbacsystem $rbacsystem
| mixed | $permissions | |
| integer | $ref_id |
Definition at line 67 of file class.ilChatroom.php.
References $lng, $ref_id, and ilUtil\sendFailure().
Referenced by ilChatroomBanTask\active(), ilChatroomPrivateRoomTask\create(), ilChatroomPrivateRoomTask\enter(), ilChatroomClearTask\executeDefault(), ilChatroomPostMessageTask\executeDefault(), ilChatroomBanTask\show(), ilChatroomHistoryTask\showMessages(), ilChatroomUploadFileTask\uploadFile(), and ilChatroomSmileyTask\view().
Here is the call graph for this function:
Here is the caller graph for this function:| ilChatroom::clearMessages | ( | $sub_room | ) |
Definition at line 1390 of file class.ilChatroom.php.
References $ilDB.
| ilChatroom::closePrivateRoom | ( | $id | ) |
Definition at line 865 of file class.ilChatroom.php.
References $ilDB.
| ilChatroom::countActiveUsers | ( | ) |
Definition at line 1137 of file class.ilChatroom.php.
| ilChatroom::disconnectAllUsersFromAllRooms | ( | ) |
Deletes all entrys from userTable.
ilDBMySQL $ilDB
Definition at line 556 of file class.ilChatroom.php.
References $ilDB.
Referenced by ilChatroomServerHandler\serverStarted().
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 277 of file class.ilChatroom.php.
References disconnectUsers().
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.
ilDB $ilDB
| array | $userIds |
Definition at line 291 of file class.ilChatroom.php.
References $ilDB, $row, and getSetting().
Referenced by disconnectUser().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 1181 of file class.ilChatroom.php.
Referenced by ilChatroomServerHandler\cleanupPrivateRooms().
Here is the caller graph for this function:| ilChatroom::getActivePrivateRooms | ( | $userid | ) |
Definition at line 1042 of file class.ilChatroom.php.
References $ilDB, $row, and listUsersInPrivateRoom().
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.
ilDBMySQL $ilDB
Definition at line 749 of file class.ilChatroom.php.
References $ilDB, $result, $row, and getRoomId().
Here is the call graph for this function:| ilChatroom::getChatURL | ( | $gui, | |
$scope_id = 0 |
|||
| ) |
ilCtrl $ilCtrl
| <type> | $gui |
| <type> | $scope_id |
Definition at line 920 of file class.ilChatroom.php.
References ilLink\_getStaticLink().
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.
ilDBMySQL $ilDB
Definition at line 253 of file class.ilChatroom.php.
| ilChatroom::getDescription | ( | ) |
Definition at line 121 of file class.ilChatroom.php.
References ilObjectFactory\getInstanceByObjId(), and getSetting().
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.
ilDBMySQL $ilDB
| ilDateTime | $from | |
| ilDateTime | $to | |
| integer | $restricted_session_userid |
Definition at line 578 of file class.ilChatroom.php.
References $ilDB, $ilUser, $result, $row, and getRoomId().
Here is the call graph for this function:| ilChatroom::getLastMessages | ( | $number, | |
$chatuser = null |
|||
| ) |
Definition at line 1329 of file class.ilChatroom.php.
References $ilDB, $results, and $row.
| ilChatroom::getLastSession | ( | ilChatroomUser | $user | ) |
Returns last session from user.
Returns row from sessionTable where user_id matches userId from given $user object.
ilDBMySQL $ilDB
| ilChatroomUser | $user |
Definition at line 796 of file class.ilChatroom.php.
References $ilDB, $row, and ilChatroomUser\getUserId().
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 626 of file class.ilChatroom.php.
References $ilDB, $result, and $row.
| ilChatroom::getPrivateSubRooms | ( | $parent_room, | |
| $user_id | |||
| ) |
Definition at line 1267 of file class.ilChatroom.php.
References $ilDB, $res, and $row.
| ilChatroom::getRefIdByRoomId | ( | $room_id | ) |
Returns ref_id of given room_id.
ilDBMySQL $ilDB
| integer | $room_id |
Definition at line 1302 of file class.ilChatroom.php.
| ilChatroom::getRoomId | ( | ) |
Returns roomID from $this->roomId.
Definition at line 494 of file class.ilChatroom.php.
References $roomId.
Referenced by ilChatroomServerConnector\createPrivateRoom(), getBannedUsers(), getHistory(), getSessions(), isUserBanned(), and unbanUser().
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.
ilDBMySQL $ilDB
| ilChatroomUser | $user |
Definition at line 823 of file class.ilChatroom.php.
References $ilDB, $result, $row, and getRoomId().
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 137 of file class.ilChatroom.php.
Referenced by disconnectUsers(), getDescription(), and getTitle().
Here is the caller graph for this function:| ilChatroom::getSettings | ( | ) |
Returns $this->settings array.
Definition at line 410 of file class.ilChatroom.php.
References $settings.
| ilChatroom::getTitle | ( | ) |
Definition at line 50 of file class.ilChatroom.php.
References ilObjectFactory\getInstanceByObjId(), and getSetting().
Here is the call graph for this function:| ilChatroom::getUniquePrivateRoomTitle | ( | $title | ) |
Definition at line 1153 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 475 of file class.ilChatroom.php.
References setSetting().
Here is the call graph for this function:| ilChatroom::inviteUserToPrivateRoomByLogin | ( | $login, | |
| $proom_id | |||
| ) |
Definition at line 1020 of file class.ilChatroom.php.
References $ilDB, and ilObjUser\_lookupId().
Here is the call graph for this function:| ilChatroom::isAllowedToEnterPrivateRoom | ( | $chat_userid, | |
| $proom_id | |||
| ) |
Definition at line 524 of file class.ilChatroom.php.
| ilChatroom::isOwnerOfPrivateRoom | ( | $user_id, | |
| $proom_id | |||
| ) |
Definition at line 876 of file class.ilChatroom.php.
References $ilDB.
| ilChatroom::isSubscribed | ( | $chat_userid | ) |
Returns true if entry exists in userTable matching given $chat_userid and $this->roomId.
ilDBMySQL $ilDB
| integer | $chat_userid |
Definition at line 507 of file class.ilChatroom.php.
| ilChatroom::isUserBanned | ( | $user_id | ) |
Returns true if there's an entry in banTable matching roomId and given $user_id.
ilDBMySQL $ilDB
| integer | $user_id |
Definition at line 724 of file class.ilChatroom.php.
References $ilDB, $row, and getRoomId().
Here is the call graph for this function:| ilChatroom::listUsersInPrivateRoom | ( | $private_room_id | ) |
Definition at line 1065 of file class.ilChatroom.php.
Referenced by getActivePrivateRooms().
Here is the caller graph for this function:
|
static |
Definition at line 1026 of file class.ilChatroom.php.
Referenced by ilChatroomServerConnector\inviteToPrivateRoom().
Here is the caller graph for this function:
|
private |
Definition at line 349 of file class.ilChatroom.php.
Referenced by saveSettings().
Here is the caller graph for this function:| ilChatroom::save | ( | ) |
Saves settings using $this->settings.
Definition at line 156 of file class.ilChatroom.php.
References saveSettings().
Here is the call graph for this function:| ilChatroom::saveFileUploadToDb | ( | $user_id, | |
| $filename, | |||
| $type | |||
| ) |
Saves information about file uploads in DB.
ilDBMySQL $ilDB
| integer | $user_id | |
| string | $filename | |
| string | $type |
Definition at line 651 of file class.ilChatroom.php.
References $filename, and $ilDB.
| ilChatroom::saveSettings | ( | array | $settings | ) |
Saves settings into settingsTable using given settings array.
ilDBMySQL $ilDB
| array | $settings |
Definition at line 365 of file class.ilChatroom.php.
References $ilDB, and phpTypeToMDBType().
Referenced by save().
Here is the call 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 148 of file class.ilChatroom.php.
Referenced by initialize().
Here is the caller graph for this function:| ilChatroom::subscribeUserToPrivateRoom | ( | $room_id, | |
| $user_id | |||
| ) |
Definition at line 1098 of file class.ilChatroom.php.
References $ilDB, and userIsInPrivateRoom().
Referenced by ilChatroomServerConnector\createPrivateRoom().
Here is the call graph for this function:
Here is the caller graph for this function:| ilChatroom::unbanUser | ( | $user_id | ) |
Deletes entry from banTable matching roomId and given $user_id and returns true if sucessful.
ilDBMySQL $ilDB
| mixed | $user_id |
Definition at line 700 of file class.ilChatroom.php.
References $ilDB, and getRoomId().
Here is the call graph for this function:| ilChatroom::unsubscribeUserFromPrivateRoom | ( | $room_id, | |
| $user_id | |||
| ) |
ilDB $ilDB
| integer | $room_id | |
| integer | $user_id |
Definition at line 1121 of file class.ilChatroom.php.
References $ilDB.
| ilChatroom::userIsInPrivateRoom | ( | $room_id, | |
| $user_id | |||
| ) |
Definition at line 1085 of file class.ilChatroom.php.
References $ilDB.
Referenced by subscribeUserToPrivateRoom().
Here is the caller graph for this function:
|
private |
Definition at line 34 of file class.ilChatroom.php.
|
staticprivate |
Definition at line 21 of file class.ilChatroom.php.
|
staticprivate |
Definition at line 18 of file class.ilChatroom.php.
|
private |
Definition at line 48 of file class.ilChatroom.php.
|
staticprivate |
Definition at line 25 of file class.ilChatroom.php.
|
staticprivate |
Definition at line 22 of file class.ilChatroom.php.
|
staticprivate |
Definition at line 23 of file class.ilChatroom.php.
|
private |
Definition at line 46 of file class.ilChatroom.php.
Referenced by getRoomId().
|
staticprivate |
Definition at line 20 of file class.ilChatroom.php.
|
private |
Definition at line 16 of file class.ilChatroom.php.
Referenced by addPrivateRoom(), and getSettings().
|
staticprivate |
Definition at line 17 of file class.ilChatroom.php.
|
staticprivate |
Definition at line 24 of file class.ilChatroom.php.
|
staticprivate |
Definition at line 19 of file class.ilChatroom.php.