From 6c216bee40c8e8d9e7fb7037e7ea59424299910d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 31 Aug 2011 09:10:08 +0000 Subject: [PATCH] Method getResponseTypeFromSystem() introduced --- .../main/class_BaseFrameworkSystem.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/inc/classes/main/class_BaseFrameworkSystem.php b/inc/classes/main/class_BaseFrameworkSystem.php index 731a7251..fef51b5e 100644 --- a/inc/classes/main/class_BaseFrameworkSystem.php +++ b/inc/classes/main/class_BaseFrameworkSystem.php @@ -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] -- 2.39.5