Renamed more stuff (will break app_die(), so it needs fixing).
[core.git] / inc / classes / main / class_BaseFrameworkSystem.php
index c5226fed87530797370d1acee063116bb7bba829..cfba6f1f3aa11b5c90b4e3cddf4bbf0e0926dc2f 100644 (file)
@@ -1509,7 +1509,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
        }
 
        /**
-        * Prepare the template engine (WebTemplateEngine by default) for a given
+        * Prepare the template engine (HtmlTemplateEngine by default) for a given
         * application helper instance (ApplicationHelper by default).
         *
         * @param               $applicationInstance    An application helper instance or
@@ -1532,7 +1532,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                } // END - if
 
                // Initialize the template engine
-               $templateInstance = ObjectFactory::createObjectByConfiguredName('web_template_class');
+               $templateInstance = ObjectFactory::createObjectByConfiguredName('html_template_class');
 
                // Return the prepared instance
                return $templateInstance;
@@ -2229,8 +2229,11 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
 
                // Is 'HTTP_HOST' set?
                if (isset($_SERVER['HTTP_HOST'])) {
-                       // Then it is a HTTP response/request
-                       $responseType = 'http';
+                       /*
+                        * Then it is a HTML response/request as RSS and so on may be
+                        * transfered over HTTP as well.
+                        */
+                       $responseType = 'html';
                } // END - if
 
                // Return it
@@ -2949,6 +2952,28 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                return $isValid;
        }
 
+       /**
+        * Initializes the web output instance
+        *
+        * @return      void
+        */
+       protected function initWebOutputInstance () {
+               // Get application instance
+               $applicationInstance = Registry::getRegistry()->getInstance('app');
+
+               // Is this a response instance?
+               if ($this instanceof Responseable) {
+                       // Then set it in application instance
+                       $applicationInstance->setResponseInstance($this);
+               } // END - if
+
+               // Init web output instance
+               $outputInstance = ObjectFactory::createObjectByConfiguredName('output_class', array($applicationInstance));
+
+               // Set it locally
+               $this->setWebOutputInstance($outputInstance);
+       }
+
        /**
         * Translates boolean TRUE to 'Y' and FALSE to 'N'
         *