ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilProxySettings Class Reference

class ilProxySettings More...

+ Collaboration diagram for ilProxySettings:

Public Member Functions

 isActive ($status=null)
 Getter/Setter for status.
 setHost ($host)
 Setter for host.
 getHost ()
 Getter for host.
 setPort ($port)
 Setter for port.
 getPort ()
 Getter for port.
 save ()
 Saves the current data in database.
 checkConnection ()
 Verifies the proxy server connection.

Static Public Member Functions

static _getInstance ()
 Getter for unique instance.

Protected Member Functions

 __construct ()
 Constructor.
 read ()
 Fetches data from database.

Protected Attributes

 $host = ''
 $post = ''
 $isActive = false

Static Protected Attributes

static $_instance = null

Private Member Functions

 __clone ()
 __clone

Detailed Description

class ilProxySettings

Author
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

Definition at line 13 of file class.ilProxySettings.php.

Constructor & Destructor Documentation

ilProxySettings::__construct ( )
protected

Constructor.

protected

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

References read().

{
$this->read();
}

+ Here is the call graph for this function:

Member Function Documentation

ilProxySettings::__clone ( )
private

__clone

private

Definition at line 78 of file class.ilProxySettings.php.

{
}
static ilProxySettings::_getInstance ( )
static

Getter for unique instance.

public

Returns
ilProxySettings

Definition at line 91 of file class.ilProxySettings.php.

References $_instance.

Referenced by ilLinkChecker\__validateLinks(), ilExternalFeed\_checkUrl(), ilExternalFeed\_determineFeedUrl(), ilExternalFeed\ilExternalFeed(), ilObjSystemFolderGUI\printProxyStatus(), ilObjSystemFolderGUI\saveProxyObject(), and ilObjSystemFolderGUI\showProxyObject().

{
if(null === self::$_instance)
{
self::$_instance = new self();
}
}

+ Here is the caller graph for this function:

ilProxySettings::checkConnection ( )

Verifies the proxy server connection.

public

Returns
ilProxySettings
Exceptions
ilProxyException

Definition at line 224 of file class.ilProxySettings.php.

References $lng, getHost(), getPort(), and PEAR_ERROR_RETURN.

{
require_once 'Services/PEAR/lib/Net/Socket.php';
$socket = new Net_Socket();
$socket->setErrorHandling(PEAR_ERROR_RETURN);
$response = $socket->connect($this->getHost(), $this->getPort());
if(!is_bool($response))
{
global $lng;
throw new ilProxyException(strlen($response) ? $response : $lng->txt('proxy_not_connectable'));
}
return $this;
}

+ Here is the call graph for this function:

ilProxySettings::getHost ( )

Getter for host.

public

Returns
string

Definition at line 162 of file class.ilProxySettings.php.

References $host.

Referenced by checkConnection(), and save().

{
return $this->host;
}

+ Here is the caller graph for this function:

ilProxySettings::getPort ( )

Getter for port.

public

Returns
string

Definition at line 191 of file class.ilProxySettings.php.

Referenced by checkConnection(), and save().

{
return $this->port;
}

+ Here is the caller graph for this function:

ilProxySettings::isActive (   $status = null)

Getter/Setter for status.

public

Parameters
mixedboolean or null
Returns
mixed ilProxySettings or boolean

Definition at line 126 of file class.ilProxySettings.php.

References $isActive.

Referenced by read(), and save().

{
if(null === $status)
{
return (bool)$this->isActive;
}
$this->isActive = (bool)$status;
return $this;
}

+ Here is the caller graph for this function:

ilProxySettings::read ( )
protected

Fetches data from database.

protected

Definition at line 108 of file class.ilProxySettings.php.

References $ilSetting, isActive(), setHost(), and setPort().

Referenced by __construct().

{
global $ilSetting;
$this->setHost($ilSetting->get('proxy_host'));
$this->setPort($ilSetting->get('proxy_port'));
$this->isActive((bool)$ilSetting->get('proxy_status'));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilProxySettings::save ( )

Saves the current data in database.

public

Returns
ilProxySettings

Definition at line 204 of file class.ilProxySettings.php.

References $ilSetting, getHost(), getPort(), and isActive().

{
global $ilSetting;
$ilSetting->set('proxy_host', $this->getHost());
$ilSetting->set('proxy_port', $this->getPort());
$ilSetting->set('proxy_status', (int)$this->isActive());
return $this;
}

+ Here is the call graph for this function:

ilProxySettings::setHost (   $host)

Setter for host.

public

Parameters
string
Returns
ilProxySettings

Definition at line 147 of file class.ilProxySettings.php.

References $host.

Referenced by read().

{
$this->host = $host;
return $this;
}

+ Here is the caller graph for this function:

ilProxySettings::setPort (   $port)

Setter for port.

public

Parameters
string
Returns
ilProxySettings

Definition at line 176 of file class.ilProxySettings.php.

Referenced by read().

{
$this->port = $port;
return $this;
}

+ Here is the caller graph for this function:

Field Documentation

ilProxySettings::$_instance = null
staticprotected

Definition at line 24 of file class.ilProxySettings.php.

Referenced by _getInstance().

ilProxySettings::$host = ''
protected

Definition at line 35 of file class.ilProxySettings.php.

Referenced by getHost(), and setHost().

ilProxySettings::$isActive = false
protected

Definition at line 57 of file class.ilProxySettings.php.

Referenced by isActive().

ilProxySettings::$post = ''
protected

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


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