]> git.mxchange.org Git - shipsimu.git/blobdiff - inc/classes/main/response/class_HttpResponse.php
Login area extended and misc things changed:
[shipsimu.git] / inc / classes / main / response / class_HttpResponse.php
index 46979c7fa17227f1435ca1314ba3c572214b569f..6882981c605b086087fc4671a81357691905c590 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, this is free software
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
@@ -48,7 +48,7 @@ class HttpResponse extends BaseFrameworkSystem implements Responseable {
        /**
         * Instance of the template engine
         */
-       private $templateEngine = null;
+       private $templateInstance = null;
 
        /**
         * Fatal resolved messages from filters and so on
@@ -213,16 +213,7 @@ class HttpResponse extends BaseFrameworkSystem implements Responseable {
         * @return      void
         */
        public final function initTemplateEngine (ManageableApplication $appInstance) {
-               $this->templateEngine = $this->prepareTemplateEngine($appInstance);
-       }
-
-       /**
-        * Getter for the template engine instance
-        *
-        * @return      $templateEngine         An instance of the used template engine
-        */
-       public final function getTemplateEngine () {
-               return $this->templateEngine;
+               $this->setTemplateInstance($this->prepareTemplateInstance($appInstance));
        }
 
        /**
@@ -252,9 +243,11 @@ class HttpResponse extends BaseFrameworkSystem implements Responseable {
         * @todo        this will send only one cookie out, the first one.
         */
        public function addCookie ($cookieName, $cookieValue, $encrypted = false, $expires = null) {
+               //* DEBUG: */ echo $cookieName."=".$cookieValue."<br />\n";
                // Are headers already sent?
                if (headers_sent()) {
                        // Throw an exception here
+                       //* DEBUG: */ return;
                        throw new ResponseHeadersAlreadySentException($this, self::EXCEPTION_HEADERS_ALREADY_SENT);
                } // END - if
 
@@ -359,6 +352,16 @@ class HttpResponse extends BaseFrameworkSystem implements Responseable {
                        $this->addCookie($cookieName, $_COOKIE[$cookieName], false);
                } // END - if
        }
+
+       /**
+        * Getter for default command
+        *
+        * @return      $defaultCommand         Default command for this response
+        */
+       public function getDefaultCommand () {
+               $defaultCommand = $this->getConfigInstance()->readConfig('default_web_command');
+               return $defaultCommand;
+       }
 }
 
 // [EOF]