4require_once 
'./Services/Http/exceptions/class.ilProxyException.php';
 
   95        if (
null === self::$_instance) {
 
   96            self::$_instance = 
new self();
 
  113        $this->
setHost($ilSetting->get(
'proxy_host'));
 
  114        $this->
setPort($ilSetting->get(
'proxy_port'));
 
  115        $this->
isActive((
bool) $ilSetting->get(
'proxy_status'));
 
  129        if (
null === $status) {
 
  209        $ilSetting->set(
'proxy_port', $this->
getPort());
 
  210        $ilSetting->set(
'proxy_status', (
int) $this->
isActive());
 
  231        set_error_handler(
function ($severity, 
$message, $file, $line) {
 
  232            throw new ErrorException(
$message, $severity, $severity, $file, $line);
 
  237            if (strspn(
$host, 
'.0123456789') != strlen(
$host) && strstr(
$host, 
'/') === 
false) {
 
  240            $port = $this->
getPort() % 65536;
 
  242            if (!fsockopen(
$host, $port, $errno, $errstr, self::CONNECTION_CHECK_TIMEOUT)) {
 
  243                restore_error_handler();
 
  244                throw new ilProxyException(strlen($errstr) ? $errstr : 
$DIC->language()->txt(
'proxy_not_connectable'));
 
  246            restore_error_handler();
 
  247        } 
catch (Exception $e) {
 
  248            restore_error_handler();
 
  249            throw new ilProxyException(strlen($errstr) ? $errstr : 
$DIC->language()->txt(
'proxy_not_connectable'));
 
An exception for terminatinating execution or to throw for unit testing.
Class for proxy related exception handling in ILIAS.
static _getInstance()
Getter for unique instance.
const CONNECTION_CHECK_TIMEOUT
checkConnection()
Verifies the proxy server connection.
__construct()
Constructor.
getHost()
Getter for host.
read()
Fetches data from database.
setHost($host)
Setter for host.
getPort()
Getter for port.
save()
Saves the current data in database.
isActive($status=null)
Getter/Setter for status.
setPort($port)
Setter for port.
catch(Exception $e) $message