]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/tools/console/class_ConsoleTools.php
Continued:
[core.git] / framework / main / classes / tools / console / class_ConsoleTools.php
index 4cddfca2ed40d7095d898de05842d1b9c5aa7307..d4c7b728fa5b7d6f8b17d2396b05781da8963148 100644 (file)
@@ -67,7 +67,7 @@ class ConsoleTools extends BaseFrameworkSystem {
                // 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
@@ -93,9 +93,9 @@ class ConsoleTools extends BaseFrameworkSystem {
                $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
 
@@ -246,7 +246,7 @@ class ConsoleTools extends BaseFrameworkSystem {
                $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
@@ -318,10 +318,10 @@ class ConsoleTools extends BaseFrameworkSystem {
                // 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);
@@ -342,7 +342,7 @@ class ConsoleTools extends BaseFrameworkSystem {
                // 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);