ILIAS
release_4-3 Revision
|
Class ilChatroom. More...
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.
ilChatroom::addPrivateRoom | ( | $title, | |
ilChatroomUser | $owner, | ||
$settings | |||
) |
Definition at line 840 of file class.ilChatroom.php.
References $settings, $title, and ilChatroomUser\getUserId().
Referenced by ilChatroomServerConnector\createPrivateRoom().
ilChatroom::banUser | ( | $user_id, | |
$comment = '' |
|||
) |
Inserts user into banTable, using given $user_id.
ilDBMySQL $ilDB
integer | $user_id | |
string | $comment |
Definition at line 673 of file class.ilChatroom.php.
References $comment.
|
static |
Returns ilChatroom object by given $object_id.
ilDBMySQL $ilDB
integer | $object_id |
Definition at line 418 of file class.ilChatroom.php.
References $row.
Referenced by ilChatroomBanTask\active(), ilChatroomHistoryTask\byDay(), ilChatroomHistoryTask\bySession(), ilChatroomServerHandler\cleanupPrivateRooms(), ilObjChatroom\cloneObject(), ilChatroomPrivateRoomTask\create(), ilChatroomBanTask\delete(), ilChatroomPrivateRoomTask\delete(), ilChatroomPrivateRoomTask\enter(), ilChatroomInitialTask\executeDefault(), ilChatroomClearTask\executeDefault(), ilChatroomPostMessageTask\executeDefault(), ilChatroomPrivateRoomTask\leave(), ilChatroomPrivateRoomTask\listUsers(), ilChatroomBanTask\show(), ilChatroomHistoryTask\showMessages(), ilChatroomKickTask\sub(), and ilChatroomUploadFileTask\uploadFile().
|
static |
Returns ilChatroom by given $room_id.
ilDBMySQL $ilDB
integer | $room_id |
Definition at line 441 of file class.ilChatroom.php.
References $row, and ilObjectFactory\getInstanceByObjId().
Referenced by ilChatroomServerHandler\disconnectedUsers().
|
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.
References $lng, $ref_id, and $usr_id.
Referenced by ilChatroomKickTask\sub().
|
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().
ilChatroom::clearMessages | ( | $sub_room | ) |
Definition at line 1376 of file class.ilChatroom.php.
ilChatroom::closePrivateRoom | ( | $id | ) |
Definition at line 861 of file class.ilChatroom.php.
ilChatroom::countActiveUsers | ( | ) |
Definition at line 1130 of file class.ilChatroom.php.
References $row.
ilChatroom::disconnectAllUsersFromAllRooms | ( | ) |
Deletes all entrys from userTable.
ilDBMySQL $ilDB
Definition at line 552 of file class.ilChatroom.php.
Referenced by ilChatroomServerHandler\serverStarted().
ilChatroom::disconnectUser | ( | $user_id | ) |
Creates userId array by given $user object and calls disconnectUsers method.
int | $user_id |
Definition at line 273 of file class.ilChatroom.php.
References disconnectUsers().
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 287 of file class.ilChatroom.php.
References $row, and getSetting().
Referenced by disconnectUser().
|
static |
Definition at line 1174 of file class.ilChatroom.php.
References $row.
Referenced by ilChatroomServerHandler\cleanupPrivateRooms().
ilChatroom::getActivePrivateRooms | ( | $userid | ) |
Definition at line 1038 of file class.ilChatroom.php.
References $row, and listUsersInPrivateRoom().
ilChatroom::getBannedUsers | ( | ) |
Returns an multidimensional array containing userdata from users having an entry in banTable with matching roomId.
ilDBMySQL $ilDB
Definition at line 745 of file class.ilChatroom.php.
References $result, $row, and getRoomId().
ilChatroom::getChatURL | ( | $gui, | |
$scope_id = 0 |
|||
) |
ilCtrl $ilCtrl
<type> | $gui |
<type> | $scope_id |
Definition at line 916 of file class.ilChatroom.php.
References ilLink\_getStaticLink().
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 249 of file class.ilChatroom.php.
References $row.
ilChatroom::getDescription | ( | ) |
Definition at line 121 of file class.ilChatroom.php.
References ilObjectFactory\getInstanceByObjId(), and getSetting().
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 574 of file class.ilChatroom.php.
References $ilUser, $result, $row, and getRoomId().
ilChatroom::getLastMessages | ( | $number, | |
$chatuser = null |
|||
) |
Definition at line 1315 of file class.ilChatroom.php.
References $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 792 of file class.ilChatroom.php.
References $row, and ilChatroomUser\getUserId().
ilChatroom::getPrivateRoomSessions | ( | ilDateTime | $from = null , |
ilDateTime | $to = null , |
||
$user_id = 0 , |
|||
$room_id = 0 |
|||
) |
Definition at line 622 of file class.ilChatroom.php.
ilChatroom::getPrivateSubRooms | ( | $parent_room, | |
$user_id | |||
) |
Definition at line 1253 of file class.ilChatroom.php.
ilChatroom::getRefIdByRoomId | ( | $room_id | ) |
Returns ref_id of given room_id.
ilDBMySQL $ilDB
integer | $room_id |
Definition at line 1288 of file class.ilChatroom.php.
ilChatroom::getRoomId | ( | ) |
Returns roomID from $this->roomId.
Definition at line 490 of file class.ilChatroom.php.
References $roomId.
Referenced by ilChatroomServerConnector\createPrivateRoom(), getBannedUsers(), getHistory(), getSessions(), isUserBanned(), and unbanUser().
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 819 of file class.ilChatroom.php.
References $result, $row, and getRoomId().
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().
ilChatroom::getSettings | ( | ) |
Returns $this->settings array.
Definition at line 406 of file class.ilChatroom.php.
References $settings.
ilChatroom::getTitle | ( | ) |
Definition at line 50 of file class.ilChatroom.php.
References ilObjectFactory\getInstanceByObjId(), and getSetting().
ilChatroom::getUniquePrivateRoomTitle | ( | $title | ) |
Definition at line 1146 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 471 of file class.ilChatroom.php.
References setSetting().
ilChatroom::inviteUserToPrivateRoomByLogin | ( | $login, | |
$proom_id | |||
) |
Definition at line 1016 of file class.ilChatroom.php.
References ilObjUser\_lookupId().
ilChatroom::isAllowedToEnterPrivateRoom | ( | $chat_userid, | |
$proom_id | |||
) |
Definition at line 520 of file class.ilChatroom.php.
References $row.
ilChatroom::isOwnerOfPrivateRoom | ( | $user_id, | |
$proom_id | |||
) |
Definition at line 872 of file class.ilChatroom.php.
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 503 of file class.ilChatroom.php.
References $row.
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 720 of file class.ilChatroom.php.
References $row, and getRoomId().
ilChatroom::listUsersInPrivateRoom | ( | $private_room_id | ) |
Definition at line 1061 of file class.ilChatroom.php.
References $row.
Referenced by getActivePrivateRooms().
|
static |
Definition at line 1022 of file class.ilChatroom.php.
References $row.
Referenced by ilChatroomServerConnector\inviteToPrivateRoom().
|
private |
Definition at line 345 of file class.ilChatroom.php.
Referenced by saveSettings().
ilChatroom::save | ( | ) |
Saves settings using $this->settings.
Definition at line 156 of file class.ilChatroom.php.
References saveSettings().
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 647 of file class.ilChatroom.php.
References $filename.
ilChatroom::saveSettings | ( | array | $settings | ) |
Saves settings into settingsTable using given settings array.
ilDBMySQL $ilDB
array | $settings |
Definition at line 361 of file class.ilChatroom.php.
References phpTypeToMDBType().
Referenced by save().
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().
ilChatroom::subscribeUserToPrivateRoom | ( | $room_id, | |
$user_id | |||
) |
Definition at line 1091 of file class.ilChatroom.php.
References userIsInPrivateRoom().
Referenced by ilChatroomServerConnector\createPrivateRoom().
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 696 of file class.ilChatroom.php.
References getRoomId().
ilChatroom::unsubscribeUserFromPrivateRoom | ( | $room_id, | |
$user_id | |||
) |
ilDB $ilDB
integer | $room_id | |
integer | $user_id |
Definition at line 1114 of file class.ilChatroom.php.
ilChatroom::userIsInPrivateRoom | ( | $room_id, | |
$user_id | |||
) |
Definition at line 1078 of file class.ilChatroom.php.
Referenced by subscribeUserToPrivateRoom().
|
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.