]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/response/image/class_ImageResponse.php
Opps, forgot this.
[core.git] / inc / classes / main / response / image / class_ImageResponse.php
index 0fa0e96149de70b07309e3a816d6a26a87dd1527..e6c5190d2e2494d534ccfb4cf56afdda20329e17 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2013 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -33,6 +33,9 @@ class ImageResponse extends BaseResponse implements Responseable {
        protected function __construct () {
                // Call parent constructor
                parent::__construct(__CLASS__);
+
+               // Set response type
+               $this->setResponseType('image');
        }
 
        /**
@@ -51,6 +54,9 @@ class ImageResponse extends BaseResponse implements Responseable {
                // Initialize the template engine here
                $responseInstance->initTemplateEngine($applicationInstance);
 
+               // Init web output instance
+               $responseInstance->initWebOutputInstance();
+
                // Return the prepared instance
                return $responseInstance;
        }
@@ -66,10 +72,11 @@ class ImageResponse extends BaseResponse implements Responseable {
                $cfg = $this->getConfigInstance();
 
                // Set new template engine
-               $cfg->setConfigEntry('web_template_class'         , $cfg->getConfigEntry('image_template_class'));
+               $cfg->setConfigEntry('html_template_class'    , $cfg->getConfigEntry('image_template_class'));
                $cfg->setConfigEntry('raw_template_extension' , '.img');
                $cfg->setConfigEntry('code_template_extension', '.xml');
                $cfg->setConfigEntry('tpl_base_path'          , 'templates/images/');
+               // @TODO Please fix this
                $cfg->setConfigEntry('code_template_type'     , 'image');
 
                // Get a prepared instance
@@ -230,16 +237,6 @@ class ImageResponse extends BaseResponse 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()->getConfigEntry('default_image_command');
-               return $defaultCommand;
-       }
 }
 
 // [EOF]