Method getResponseTypeFromSystem() introduced
authorRoland Häder <roland@mxchange.org>
Wed, 31 Aug 2011 09:10:08 +0000 (09:10 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 31 Aug 2011 09:10:08 +0000 (09:10 +0000)
inc/classes/main/class_BaseFrameworkSystem.php

index 731a725..fef51b5 100644 (file)
@@ -1878,6 +1878,25 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                // Return it
                return $isBase64;
        }
+
+       /**
+        * "Getter" to get response/request type from analysis of the system.
+        *
+        * @return      $responseType   Analyzed response type
+        */
+       protected function getResponseTypeFromSystem () {
+               // Default is console
+               $responseType = 'console';
+
+               // Is 'HTTP_HOST' set?
+               if (isset($_SERVER['HTTP_HOST'])) {
+                       // Then it is a HTTP response/request
+                       $responseType = 'http';
+               } // END - if
+
+               // Return it
+               return $responseType;
+       }
 }
 
 // [EOF]