]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/response/class_BaseResponse.php
Double->single quotes converted
[core.git] / inc / classes / main / response / class_BaseResponse.php
index 694996b9b017e7caf15309f764e29b59807f78a7..14c2117ec7eea3e5e1188327779ebbc1099e23b0 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
@@ -28,7 +28,7 @@ class BaseResponse extends BaseFrameworkSystem {
        /**
         * Response status
         */
-       private $responseStatus = "200 OK";
+       private $responseStatus = '200 OK';
 
        /**
         * Array with all headers
@@ -48,7 +48,7 @@ class BaseResponse extends BaseFrameworkSystem {
        /**
         * Instance of the template engine
         */
-       private $templateInstance = null;
+       private $templateInstance = NULL;
 
        /**
         * Fatal resolved messages from filters and so on
@@ -64,10 +64,6 @@ class BaseResponse extends BaseFrameworkSystem {
        protected function __construct ($className) {
                // Call parent constructor
                parent::__construct($className);
-
-               // Clean up a little
-               $this->removeNumberFormaters();
-               $this->removeSystemArray();
        }
 
        /**
@@ -158,7 +154,7 @@ class BaseResponse extends BaseFrameworkSystem {
                        throw new ResponseHeadersAlreadySentException($this, self::EXCEPTION_HEADERS_ALREADY_SENT);
                } elseif (!headers_sent()) {
                        // Send headers out
-                       header("HTTP/1.1 {$this->responseStatus}");
+                       header('HTTP/1.1 ' . $this->responseStatus);
 
                        // Used later
                        $now = gmdate('D, d M Y H:i:s') . ' GMT';
@@ -170,19 +166,19 @@ class BaseResponse extends BaseFrameworkSystem {
                        $this->addHeader('Pragma', 'no-cache'); // HTTP/1.0
 
                        // Define the charset to be used
-                       //$this->addHeader('Content-type:', sprintf("text/html; charset=%s", $this->getConfigInstance()->readConfig('header_charset')));
+                       //$this->addHeader('Content-type:', sprintf("text/html; charset=%s", $this->getConfigInstance()->getConfigEntry('header_charset')));
 
                        // Send all headers
                        foreach ($this->responseHeaders as $name => $value) {
-                               header("{$name}: {$value}");
-                               //* DEBUG: */ echo "{$name}: {$value}<br />\n";
+                               header($name . ': ' . $value);
+                               //* DEBUG: */ $this->debugOutput('name=' . $name . ',value=' . $value);
                        } // END - foreach
 
                        // Send cookies out?
                        if (count($this->cookies) > 0) {
                                // Send all cookies
                                $cookieString = implode(' ', $this->cookies);
-                               header("Set-Cookie: {$cookieString}");
+                               header('Set-Cookie: ' . $cookieString);
 
                                // Remove them all
                                $this->cookies = array();