class_WebLoginController.php

Go to the documentation of this file.
00001 <?php
00025 class WebLoginController extends BaseController implements Controller {
00031         protected function __construct () {
00032                 // Call parent constructor
00033                 parent::__construct(__CLASS__);
00034         }
00035 
00043         public final static function createWebLoginController (CommandResolver $resolverInstance) {
00044                 // Create the instance
00045                 $controllerInstance = new WebLoginController();
00046 
00047                 // Set the command resolver
00048                 $controllerInstance->setResolverInstance($resolverInstance);
00049 
00050                 // Return the prepared instance
00051                 return $controllerInstance;
00052         }
00053 
00061         public function handleRequest (Requestable $requestInstance, Responseable $responseInstance) {
00062                 // Get the command instance from the resolver by sending a request instance to the resolver
00063                 $commandInstance = $this->getResolverInstance()->resolveCommandByRequest($requestInstance);
00064 
00065                 // Add more filters by the command
00066                 $commandInstance->addExtraFilters($this, $requestInstance);
00067 
00068                 // Run the pre filters
00069                 $this->executePreFilters($requestInstance, $responseInstance);
00070 
00071                 // This request was valid! :-D
00072                 $requestInstance->requestIsValid();
00073 
00074                 // Execute the command
00075                 $commandInstance->execute($requestInstance, $responseInstance);
00076 
00077                 // Run the pre filters
00078                 $this->executePostFilters($requestInstance, $responseInstance);
00079 
00080                 // Flush the response out
00081                 $responseInstance->flushBuffer();
00082         }
00083 }
00084 
00085 // [EOF]
00086 ?>

Generated on Mon Dec 8 01:06:45 2008 for Ship-Simulator by  doxygen 1.5.6