ILIAS
release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
|
Class ilChatroomServerConnector. More...
Public Member Functions | |
__construct (ilChatroomServerSettings $settings) | |
Constructor Sets $this->settings using given $settings. More... | |
connect ($scope, $userId) | |
Returns connect URL Creates connect URL using given $scope and $userId and returns it. More... | |
post ($scope, $query) | |
Returns post URL Creates post URL using given $scope and $query and returns it. More... | |
enterPrivateRoom ($scope, $query) | |
leavePrivateRoom ($scope, $query) | |
kick ($scope, $query) | |
Returns kick URL Creates kick URL using given $scope and $query and returns it. More... | |
getSettings () | |
Returns $this->settings. More... | |
sendMessage ($scope, $message, $options=array()) | |
Returns if given message is sucessfully sent. More... | |
inviteToPrivateRoom (ilChatRoom $room, $scope, ilObjUser $inviter, $invited_id) | |
createPrivateRoom (ilChatroom $room, $title, ilChatroomUser $owner) | |
isServerAlive () | |
Static Public Member Functions | |
static | checkServerConnection ($use_cache=true) |
Static Protected Attributes | |
static | $connection_status = null |
Private Member Functions | |
file_get_contents ($url, array $stream_context_params=null) | |
sendCreatePrivateRoom ($scope, $query) | |
Private Attributes | |
$settings | |
Class ilChatroomServerConnector.
Definition at line 10 of file class.ilChatroomServerConnector.php.
ilChatroomServerConnector::__construct | ( | ilChatroomServerSettings | $settings | ) |
Constructor Sets $this->settings using given $settings.
ilChatroomServerSettings | $settings |
Definition at line 27 of file class.ilChatroomServerConnector.php.
References $settings.
|
static |
bool | true | $use_cache |
Definition at line 296 of file class.ilChatroomServerConnector.php.
Referenced by ilChatroomAdminViewTask\checkPrivHosts(), and ilChatroomBlockGUI\getHTML().
ilChatroomServerConnector::connect | ( | $scope, | |
$userId | |||
) |
Returns connect URL Creates connect URL using given $scope and $userId and returns it.
string | $scope | |
integer | $userId |
Definition at line 73 of file class.ilChatroomServerConnector.php.
References file_get_contents().
ilChatroomServerConnector::createPrivateRoom | ( | ilChatroom | $room, |
$title, | |||
ilChatroomUser | $owner | ||
) |
ilChatroom | $room | |
string | $title | |
ilChatroomUser | $owner |
Definition at line 223 of file class.ilChatroomServerConnector.php.
References $params, $query, $result, $settings, ilChatroom\addPrivateRoom(), enterPrivateRoom(), ilChatroom\getRoomId(), ilChatroomUser\getUserId(), sendCreatePrivateRoom(), sendMessage(), and ilChatroom\subscribeUserToPrivateRoom().
ilChatroomServerConnector::enterPrivateRoom | ( | $scope, | |
$query | |||
) |
string | $scope | |
string | $query |
Definition at line 111 of file class.ilChatroomServerConnector.php.
References $query, and file_get_contents().
Referenced by createPrivateRoom().
|
private |
string | $url | |
array | $stream_context_params |
Definition at line 37 of file class.ilChatroomServerConnector.php.
References $url, and ilLoggerFactory\getLogger().
Referenced by connect(), enterPrivateRoom(), isServerAlive(), kick(), leavePrivateRoom(), post(), and sendCreatePrivateRoom().
ilChatroomServerConnector::getSettings | ( | ) |
Returns $this->settings.
Definition at line 148 of file class.ilChatroomServerConnector.php.
References $settings.
ilChatroomServerConnector::inviteToPrivateRoom | ( | ilChatRoom | $room, |
$scope, | |||
ilObjUser | $inviter, | ||
$invited_id | |||
) |
ilChatRoom | $room | |
int | $scope | |
ilObjUser | $inviter | |
int | $invited_id |
Definition at line 176 of file class.ilChatroomServerConnector.php.
References ilObject\getId(), ilChatroom\lookupPrivateRoomTitle(), and sendMessage().
ilChatroomServerConnector::isServerAlive | ( | ) |
Definition at line 273 of file class.ilChatroomServerConnector.php.
References file_get_contents().
ilChatroomServerConnector::kick | ( | $scope, | |
$query | |||
) |
Returns kick URL Creates kick URL using given $scope and $query and returns it.
string | $scope | |
string | $query |
Definition at line 137 of file class.ilChatroomServerConnector.php.
References $query, and file_get_contents().
ilChatroomServerConnector::leavePrivateRoom | ( | $scope, | |
$query | |||
) |
string | $scope | |
string | $query |
Definition at line 123 of file class.ilChatroomServerConnector.php.
References $query, and file_get_contents().
ilChatroomServerConnector::post | ( | $scope, | |
$query | |||
) |
Returns post URL Creates post URL using given $scope and $query and returns it.
string | $scope | |
string | $query |
Definition at line 87 of file class.ilChatroomServerConnector.php.
References $query, and file_get_contents().
Referenced by sendMessage().
|
private |
string | $scope | |
string | $query |
Definition at line 99 of file class.ilChatroomServerConnector.php.
References $query, and file_get_contents().
Referenced by createPrivateRoom().
ilChatroomServerConnector::sendMessage | ( | $scope, | |
$message, | |||
$options = array() |
|||
) |
Returns if given message is sucessfully sent.
Calls $this->post using given $scope and $query built by http_build_query with given $message and returns if message was sent sucessfully.
string | $scope | |
string | $message |
Definition at line 162 of file class.ilChatroomServerConnector.php.
References $options, $query, and post().
Referenced by createPrivateRoom(), and inviteToPrivateRoom().
|
staticprotected |
Definition at line 15 of file class.ilChatroomServerConnector.php.
|
private |
Definition at line 20 of file class.ilChatroomServerConnector.php.
Referenced by __construct(), createPrivateRoom(), and getSettings().