38        if ($use_cache && self::$connection_status !== 
null) {
 
   42        require_once 
'Modules/Chatroom/classes/class.ilChatroomAdmin.php';
 
   44        self::$connection_status = (bool) $connector->isServerAlive();
 
   55            $this->
settings->getURL(
'Heartbeat'),
 
   68        return $responseObject->status == 200;
 
   81            $this->
settings->getURL(
'Connect', $scope) . 
'/' . $userId
 
   92        $credentials = $this->
settings->getAuthKey() . 
':' . $this->
settings->getAuthSecret();
 
   94            "Connection: close\r\n" .
 
   95            "Content-Type: application/json; charset=utf-8\r\n" .
 
   96            "Authorization: Basic " . base64_encode($credentials);
 
  109        if (is_array($stream_context_params)) {
 
  110            $ctx = array_merge_recursive($ctx, $stream_context_params);
 
  113        set_error_handler(
function ($severity, 
$message, 
$file, $line) {
 
  114            throw new ErrorException(
$message, $severity, $severity, 
$file, $line);
 
  119            restore_error_handler();
 
  121        } 
catch (Exception $e) {
 
  122            restore_error_handler();
 
  138            $this->
settings->getURL(
'CreatePrivateRoom', $scope) . 
'/' . $subScope . 
'/' . $user . 
'/' . rawurlencode(
$title)
 
  151            $this->
settings->getURL(
'DeletePrivateRoom', $scope) . 
'/' . $subScope . 
'/' . $user
 
  176            $this->
settings->getURL(
'EnterPrivateRoom', $scope) . 
'/' . $subScope . 
'/' . $user
 
  189            $this->
settings->getURL(
'ClearMessages', $scope) . 
'/' . $subScope . 
'/' . $user
 
  214            $this->
settings->getURL(
'LeavePrivateRoom', $scope) . 
'/' . $subScope . 
'/' . $user
 
  226        return $this->
kick($scope, $subScope, $user);
 
  237    public function kick($scope, $subScope, $user)
 
  240            $this->
settings->getURL(
'Kick', $scope) . 
'/' . $subScope . 
'/' . $user
 
  250    public function sendBan($scope, $subScope, $user)
 
  253            $this->
settings->getURL(
'Ban', $scope) . 
'/' . $subScope . 
'/' . $user
 
  306            $this->
settings->getURL(
'InvitePrivateRoom', $scope) . 
'/' . $subScope . 
'/' . $user . 
'/' . $invited_id
 
  317        if ($pRoomId != 
null) {
 
  318            $roomId .= 
'-' . $pRoomId;
 
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
An exception for terminatinating execution or to throw for unit testing.
static getDefaultConfiguration()
Instantiates and returns ilChatroomAdmin object using instance_id and settings from settingsTable.
Class ilChatroomServerConnector.
kick($scope, $subScope, $user)
Returns kick URL Creates kick URL using given $scope and $query and returns it.
file_get_contents($url, array $stream_context_params=null)
getSettings()
Returns $this->settings.
createUniqueScopeId($roomId, $pRoomId=null)
static $connection_status
enterPrivateRoom($scope, $subScope, $user)
sendInviteToPrivateRoom($scope, $subScope, $user, $invited_id)
__construct(ilChatroomServerSettings $settings)
Constructor Sets $this->settings using given $settings.
connect($scope, $userId)
Returns connect URL Creates connect URL using given $scope and $userId and returns it.
sendBan($scope, $subScope, $user)
sendMessage($scope, $message, $options=array())
Returns if given message is sucessfully sent.
sendUserConfigChange($message)
static checkServerConnection($use_cache=true)
sendClearMessages($scope, $subScope, $user)
sendEnterPrivateRoom($scope, $subScope, $user)
post($scope, $query)
Returns post URL Creates post URL using given $scope and $query and returns it.
sendLeavePrivateRoom($scope, $subScope, $user)
sendKick($scope, $subScope, $user)
sendDeletePrivateRoom($scope, $subScope, $user)
sendCreatePrivateRoom($scope, $subScope, $user, $title)
leavePrivateRoom($scope, $subScope, $user)
Class ilChatroomServerSettings.
static getLogger($a_component_id)
Get component logger.
catch(Exception $e) $message
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file