From: Roland Häder <roland@mxchange.org>
Date: Wed, 31 Aug 2011 09:10:08 +0000 (+0000)
Subject: Method getResponseTypeFromSystem() introduced
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6c216bee40c8e8d9e7fb7037e7ea59424299910d;p=core.git

Method getResponseTypeFromSystem() introduced
---

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]