ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilChatroomServerSettings Class Reference

Class ilChatroomServerSettings. More...

+ Collaboration diagram for ilChatroomServerSettings:

Public Member Functions

 getPort ()
 Returns $this->port.
 setPort ($port)
 Sets $this->port using given $port.
 getProtocol ()
 Returns $this->protocol.
 setProtocol ($protocol)
 Sets $this->protocol using given $protocol.
 getDomain ()
 Returns $this->domain.
 setDomain ($domain)
 Sets $this->domain using given $domain.
 getURL ($action, $scope)
 Creates URL by calling $this->getBaseURL and using given $action and $scope and returns it.
 getBaseURL ()
 Returns base URL.
 getInstance ()
 Returns $this->instance.
 setInstance ($instance)
 Sets $this->instance using given $instance.
 setSmiliesEnabled ($a_bool)
 getSmiliesEnabled ()

Static Public Member Functions

static loadDefault ()

Private Attributes

 $port = '8585'
 $protocol = 'http://'
 $domain = '192.168.1.94'
 $instance = '123456'

Detailed Description

Member Function Documentation

ilChatroomServerSettings::getBaseURL ( )

Returns base URL.

Creates base URL by calling $this->getProtocol(), $this->getDomain() and $this->getPort() and returnes it.

Returns
string

Definition at line 103 of file class.ilChatroomServerSettings.php.

References getDomain(), getPort(), and getProtocol().

Referenced by getURL().

{
return $this->getProtocol() . $this->getDomain() . ':' . $this->getPort();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilChatroomServerSettings::getDomain ( )

Returns $this->domain.

Returns
string

Definition at line 66 of file class.ilChatroomServerSettings.php.

References $domain.

Referenced by getBaseURL().

{
return $this->domain;
}

+ Here is the caller graph for this function:

ilChatroomServerSettings::getInstance ( )

Returns $this->instance.

Returns
string

Definition at line 113 of file class.ilChatroomServerSettings.php.

References $instance.

Referenced by getURL().

{
}

+ Here is the caller graph for this function:

ilChatroomServerSettings::getPort ( )

Returns $this->port.

Returns
string

Definition at line 26 of file class.ilChatroomServerSettings.php.

References $port.

Referenced by getBaseURL().

{
return $this->port;
}

+ Here is the caller graph for this function:

ilChatroomServerSettings::getProtocol ( )

Returns $this->protocol.

Returns
string

Definition at line 46 of file class.ilChatroomServerSettings.php.

References $protocol.

Referenced by getBaseURL().

{
}

+ Here is the caller graph for this function:

ilChatroomServerSettings::getSmiliesEnabled ( )

Definition at line 132 of file class.ilChatroomServerSettings.php.

{
return (bool) $this->smilies_enabled;
}
ilChatroomServerSettings::getURL (   $action,
  $scope 
)

Creates URL by calling $this->getBaseURL and using given $action and $scope and returns it.

Parameters
string$action
string$scope
Returns
string

Definition at line 89 of file class.ilChatroomServerSettings.php.

References getBaseURL(), and getInstance().

{
return $this->getBaseURL() .
'/backend/' . $action . '/' . $this->getInstance() . '/' . $scope;
}

+ Here is the call graph for this function:

static ilChatroomServerSettings::loadDefault ( )
static

Definition at line 136 of file class.ilChatroomServerSettings.php.

References $ilDB, $query, and $row.

Referenced by ilObjChatroomAdminGUI\getConnector(), and ilChatroomAdmin\getServerSettings().

{
global $ilDB;
$query = 'SELECT * FROM chatroom_admconfig';
$rset = $ilDB->query($query);
$row = $ilDB->fetchAssoc($rset);
$client_settings = json_decode($row['client_settings']);
$server_settings = json_decode($row['server_settings']);
$settings = new ilChatroomServerSettings();
$settings->setPort($server_settings->port);
$settings->setProtocol($server_settings->protocol);
$settings->setInstance($client_settings->name);
$settings->setDomain($server_settings->address);
$settings->setSmiliesEnabled($client_settings->enable_smilies);
return $settings;
}

+ Here is the caller graph for this function:

ilChatroomServerSettings::setDomain (   $domain)

Sets $this->domain using given $domain.

Parameters
string$domain

Definition at line 76 of file class.ilChatroomServerSettings.php.

References $domain.

{
$this->domain = $domain;
}
ilChatroomServerSettings::setInstance (   $instance)

Sets $this->instance using given $instance.

Parameters
string$instance

Definition at line 123 of file class.ilChatroomServerSettings.php.

References $instance.

{
$this->instance = $instance;
}
ilChatroomServerSettings::setPort (   $port)

Sets $this->port using given $port.

Parameters
string$port

Definition at line 36 of file class.ilChatroomServerSettings.php.

References $port.

{
$this->port = $port;
}
ilChatroomServerSettings::setProtocol (   $protocol)

Sets $this->protocol using given $protocol.

Parameters
string$protocol

Definition at line 56 of file class.ilChatroomServerSettings.php.

References $protocol.

{
$this->protocol = $protocol . '://';
}
ilChatroomServerSettings::setSmiliesEnabled (   $a_bool)

Definition at line 128 of file class.ilChatroomServerSettings.php.

{
$this->smilies_enabled = $a_bool;
}

Field Documentation

ilChatroomServerSettings::$domain = '192.168.1.94'
private

Definition at line 18 of file class.ilChatroomServerSettings.php.

Referenced by getDomain(), and setDomain().

ilChatroomServerSettings::$instance = '123456'
private

Definition at line 19 of file class.ilChatroomServerSettings.php.

Referenced by getInstance(), and setInstance().

ilChatroomServerSettings::$port = '8585'
private

Definition at line 16 of file class.ilChatroomServerSettings.php.

Referenced by getPort(), and setPort().

ilChatroomServerSettings::$protocol = 'http://'
private

Definition at line 17 of file class.ilChatroomServerSettings.php.

Referenced by getProtocol(), and setProtocol().


The documentation for this class was generated from the following file: