]> git.mxchange.org Git - shipsimu.git/blobdiff - inc/classes/main/controller/default/class_WebDefaultController.php
Actions (so called sub-commands) may now have own pre/post filter, profile update...
[shipsimu.git] / inc / classes / main / controller / default / class_WebDefaultController.php
index d16713e9759e1fce4923260fbdacd2e2fd799730..7f7e862f8ae24b1e28dcb8f7cf7d6b6bdb3489b6 100644 (file)
@@ -7,6 +7,7 @@
  * @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
+ * @todo               This controller shall still provide some headlines for sidebars
  *
  * 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
@@ -21,7 +22,7 @@
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class WebWebDefaultController extends BaseController implements Controller {
+class WebDefaultController extends BaseController implements Controller {
        /**
         * Protected constructor
         *
@@ -32,10 +33,10 @@ class WebWebDefaultController extends BaseController implements Controller {
                parent::__construct(__CLASS__);
 
                // Set part description
-               $this->setObjectDescription("Standart-Controller f&uuml;r alle &uuml;brigen Anfragen");
+               $this->setObjectDescription("Default controller for all other requests");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
        }
 
        /**
@@ -64,7 +65,10 @@ class WebWebDefaultController extends BaseController implements Controller {
         */
        public function handleRequest (Requestable $requestInstance, Responseable $responseInstance) {
                // Get the command instance
-               $commandInstance = $this->getResolverInstance()->resolvCommandByRequest($requestInstance);
+               $commandInstance = $this->getResolverInstance()->resolveCommandByRequest($requestInstance);
+
+               // This request was valid! :-D
+               $requestInstance->requestIsValid();
 
                // Execute the command
                $commandInstance->execute($requestInstance, $responseInstance);