// Do we have cache?
if (!isset($GLOBALS[__METHOD__])) {
// Determine it
- $GLOBALS[__METHOD__] = (($this->getConfigInstance()->getConfigEntry('proxy_host') != '') && ($this->getConfigInstance()->getConfigEntry('proxy_port') > 0));
+ $GLOBALS[__METHOD__] = ((FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('proxy_host') != '') && (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('proxy_port') > 0));
} // END - if
// Return cache
$proxyTunnel .= 'Proxy-Connection: Keep-Alive' . self::HTTP_EOL;
// Use login data to proxy? (username at least!)
- if ($this->getConfigInstance()->getConfigEntry('proxy_username') != '') {
+ if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('proxy_username') != '') {
// Add it as well
- $encodedAuth = base64_encode($this->getConfigInstance()->getConfigEntry('proxy_username') . ':' . $this->getConfigInstance()->getConfigEntry('proxy_password'));
+ $encodedAuth = base64_encode(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('proxy_username') . ':' . FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('proxy_password'));
$proxyTunnel .= 'Proxy-Authorization: Basic ' . $encodedAuth . self::HTTP_EOL;
} // END - if
$helperInstance = new ConsoleTools();
// Get SplFileInfo instance
- $infoInstance = new SplFileInfo($helperInstance->getConfigInstance()->getConfigEntry('hostname_file'));
+ $infoInstance = new SplFileInfo(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('hostname_file'));
try {
// Get a file pointer
// Open connection
if ($helperInstance->isProxyUsed() === true) {
// Resolve hostname into IP address
- $ipAddress = self::resolveIpAddress($helperInstance->getConfigInstance()->getConfigEntry('proxy_host'));
+ $ipAddress = self::resolveIpAddress(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('proxy_host'));
// Connect to host through proxy connection
- $socketResource = fsockopen($ipAddress, $helperInstance->getConfigInstance()->getConfigEntry('proxy_port'), $errorNo, $errorStr, 30);
+ $socketResource = fsockopen($ipAddress, FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('proxy_port'), $errorNo, $errorStr, 30);
} else {
// Connect to host directly
$socketResource = fsockopen('188.138.90.169', 80, $errorNo, $errorStr, 30);
// Do we use proxy?
if ($helperInstance->isProxyUsed() === true) {
// CONNECT method?
- if ($helperInstance->getConfigInstance()->getConfigEntry('proxy_connect_method') == 'Y') {
+ if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('proxy_connect_method') == 'Y') {
// Setup proxy tunnel
$response = $helperInstance->setupProxyTunnel('shipsimu.org', 80, $socketResource);