ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilRPCServerSettings Class Reference
+ Collaboration diagram for ilRPCServerSettings:

Public Member Functions

 isEnabled ()
 Returns true if server ip and port are set.
 getServerUrl ()
 getHost ()
 setHost ($a_host)
 getPort ()
 setPort ($a_port)
 getPath ()
 update ()
 pingServer ()

Static Public Member Functions

static getInstance ()
 Get singelton instance.

Data Fields

 $rpc_host = ''
 $rpc_port = ''
 $log = null
 $db = null
 $err = null
 $settings_obj = null

Private Member Functions

 __construct ()
 Singleton contructor.

Static Private Attributes

static $instance = null

Detailed Description

Definition at line 37 of file class.ilRPCServerSettings.php.

Constructor & Destructor Documentation

ilRPCServerSettings::__construct ( )
private

Singleton contructor.

Returns

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

References $ilDB, and $ilLog.

{
global $ilLog,$ilDB,$ilError,$ilias;
$this->log =& $ilLog;
$this->db =& $ilDB;
$this->err =& $ilError;
$this->ilias =& $ilias;
}

Member Function Documentation

ilRPCServerSettings::getHost ( )

Definition at line 94 of file class.ilRPCServerSettings.php.

References $rpc_host.

Referenced by isEnabled(), and update().

{
if(strlen($this->rpc_host))
{
}
return $this->rpc_host = $this->ilias->getSetting('rpc_server_host');
}

+ Here is the caller graph for this function:

ilRPCServerSettings::getPath ( )

Definition at line 118 of file class.ilRPCServerSettings.php.

References RPC_SERVER_PATH.

{
}
ilRPCServerSettings::getPort ( )

Definition at line 106 of file class.ilRPCServerSettings.php.

References $rpc_port.

Referenced by getServerUrl(), isEnabled(), and update().

{
if(strlen($this->rpc_port))
{
}
return $this->rpc_port = $this->ilias->getSetting('rpc_server_port');
}

+ Here is the caller graph for this function:

ilRPCServerSettings::getServerUrl ( )

Definition at line 88 of file class.ilRPCServerSettings.php.

References getPort(), and RPC_SERVER_PATH.

{
return 'http://'.$this->getHost().':'.$this->getPort().'/'.RPC_SERVER_PATH;
}

+ Here is the call graph for this function:

ilRPCServerSettings::isEnabled ( )

Returns true if server ip and port are set.

Returns
bool

Definition at line 83 of file class.ilRPCServerSettings.php.

References getHost(), and getPort().

{
return strlen($this->getHost()) and strlen($this->getPort());
}

+ Here is the call graph for this function:

ilRPCServerSettings::pingServer ( )

Definition at line 131 of file class.ilRPCServerSettings.php.

References $ilLog, and ilRpcClientFactory\factory().

{
include_once './Services/WebServices/RPC/classes/class.ilRpcClientFactory.php';
try
{
ilRpcClientFactory::factory('RPCebug')->ping();
return true;
}
catch(Exception $e)
{
$ilLog->write(__METHOD__.': '.$e->getMessage());
return false;
}
}

+ Here is the call graph for this function:

ilRPCServerSettings::setHost (   $a_host)

Definition at line 102 of file class.ilRPCServerSettings.php.

{
$this->rpc_host = $a_host;
}
ilRPCServerSettings::setPort (   $a_port)

Definition at line 114 of file class.ilRPCServerSettings.php.

{
$this->rpc_port = $a_port;
}
ilRPCServerSettings::update ( )

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

References getHost(), and getPort().

{
$this->ilias->setSetting('rpc_server_host',$this->getHost());
$this->ilias->setSetting('rpc_server_port',$this->getPort());
return true;
}

+ Here is the call graph for this function:

Field Documentation

ilRPCServerSettings::$db = null

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

ilRPCServerSettings::$err = null

Definition at line 47 of file class.ilRPCServerSettings.php.

ilRPCServerSettings::$instance = null
staticprivate

Definition at line 39 of file class.ilRPCServerSettings.php.

Referenced by getInstance().

ilRPCServerSettings::$log = null

Definition at line 45 of file class.ilRPCServerSettings.php.

ilRPCServerSettings::$rpc_host = ''

Definition at line 42 of file class.ilRPCServerSettings.php.

Referenced by getHost().

ilRPCServerSettings::$rpc_port = ''

Definition at line 43 of file class.ilRPCServerSettings.php.

Referenced by getPort().

ilRPCServerSettings::$settings_obj = null

Definition at line 49 of file class.ilRPCServerSettings.php.


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