Web output instance added
[mailer.git] / application / mxchange / class_ApplicationHelper.php
index 53d3fc3e6e8947782c21ffd1374f109cb7c38650..346a848fd6267a3ce78c4520364467322b3a4294 100644 (file)
  * Please remember that this include file is being loaded *before* the class
  * loader is loading classes from "exceptions", "interfaces" and "main"!
  *
- * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @author             Roland Haeder <webmaster@mxchange.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, this is free software
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 MXChange Developer Team
  * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
+ * @link               http://www.mxchange.org
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -172,15 +172,21 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication
         * @return      void
         */
        public final function entryPoint () {
+               // Get a web output class
+               $outputInstance = ObjectFactory::createObjectByConfiguredName('output_class');
+
+               // Set it in this application
+               $this->setWebOutputInstance($outputInstance);
+
                // Create a new request object
                $requestInstance = ObjectFactory::createObjectByName('HttpRequest');
 
                // Remember request instance here
                $this->setRequestInstance($requestInstance);
 
-               // Default response is HTTP (HTML page) and type is "Web"
-               $response = "http";
-               $responseType = "web";
+               // Default response is HTTP (HTML page) and type is 'Web'
+               $response = 'http';
+               $responseType = 'web';
 
                // Do we have another response?
                if ($requestInstance->isRequestElementSet('request')) {
@@ -201,7 +207,11 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication
 
                // If it is null then get default command
                if (is_null($commandName)) {
+                       // Get default command
                        $commandName = $responseInstance->getDefaultCommand();
+
+                       // Set it in request
+                       $requestInstance->setRequestElement('page', $commandName);
                } // END - if
 
                // Get a resolver