4require_once 
'./Services/Http/exceptions/class.ilProxyException.php'; 
 
   95                if(
null === self::$_instance)
 
   97                        self::$_instance = 
new self();
 
  114                $this->
setHost($ilSetting->get(
'proxy_host'));
 
  115                $this->
setPort($ilSetting->get(
'proxy_port'));
 
  116                $this->
isActive((
bool)$ilSetting->get(
'proxy_status')); 
 
  211                $ilSetting->set(
'proxy_port', $this->
getPort());
 
  212                $ilSetting->set(
'proxy_status', (
int)$this->
isActive());
 
  233                set_error_handler(
function ($severity, $message, 
$file, $line)
 
  235                        throw new ErrorException($message, $severity, $severity, 
$file, $line);
 
  241                        if(strspn(
$host, 
'.0123456789') != strlen(
$host) && strstr(
$host, 
'/') === 
false)
 
  245                        $port =   $this->
getPort() % 65536;
 
  247                        if(!fsockopen(
$host, $port, $errno, $errstr, self::CONNECTION_CHECK_TIMEOUT))
 
  249                                restore_error_handler();
 
  250                                throw new ilProxyException(strlen($errstr) ? $errstr : 
$DIC->language()->txt(
'proxy_not_connectable'));
 
  252                        restore_error_handler();
 
  256                        restore_error_handler();
 
  257                        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.
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file