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 731a7251425522cd147c5b57efed00d3cc107447..fef51b5e0baff2dbf0b2c5c27e3098b84dc3d7c6 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]