]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/response/image/class_ImageResponse.php
Continued:
[core.git] / framework / main / classes / response / image / class_ImageResponse.php
index e6b7eff04fe5962838fe6961cfb795de89d50e3c..5354c0ecb54bbb6ad4c06202668661236c5b1e4a 100644 (file)
@@ -85,28 +85,6 @@ class ImageResponse extends BaseResponse implements Responseable {
                return $this->imageInstance;
        }
 
-       /**
-        * Initializes the template engine instance
-        *
-        * @param       $applicationInstance    An instance of a manageable application
-        * @return      void
-        */
-       public final function initTemplateEngine (ManageableApplication $applicationInstance) {
-               // Get config instance
-               $cfg = FrameworkBootstrap::getConfigurationInstance();
-
-               // Set new template engine
-               $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
-               $this->setTemplateInstance($this->prepareTemplateInstance($applicationInstance));
-       }
-
        /**
         * Adds a cookie to the response
         *
@@ -121,18 +99,18 @@ class ImageResponse extends BaseResponse implements Responseable {
         * @todo        If the return statement is removed and setcookie() commented out,
         * @todo        this will send only one cookie out, the first one.
         */
-       public function addCookie ($cookieName, $cookieValue, $encrypted = false, $expires = NULL) {
+       public function addCookie (string $cookieName, $cookieValue, bool $encrypted = FALSE, int $expires = NULL) {
                // Are headers already sent?
                if (headers_sent()) {
                        // Throw an exception here
                        throw new ResponseHeadersAlreadySentException($this, self::EXCEPTION_HEADERS_ALREADY_SENT);
-               } // END - if
+               }
 
                // Shall we encrypt the cookie?
-               if ($encrypted === true) {
+               if ($encrypted) {
                        // Unsupported at the moment
                        $this->partialStub('Encryption is unsupported at the moment.');
-               } // END - if
+               }
 
                // For slow browsers set the cookie array element first
                $_COOKIE[$cookieName] = $cookieValue;