class_WebLogoutController.php

Go to the documentation of this file.
00001 <?php
00025 class WebLogoutController extends BaseController implements Controller {
00031         protected function __construct () {
00032                 // Call parent constructor
00033                 parent::__construct(__CLASS__);
00034         }
00035 
00042         public final static function createWebLogoutController (CommandResolver $resolverInstance) {
00043                 // Create the instance
00044                 $controllerInstance = new WebLogoutController();
00045 
00046                 // Set the command resolver
00047                 $controllerInstance->setResolverInstance($resolverInstance);
00048 
00049                 // Add user auth filter (we don't need an update of the user here because it will be redirected)
00050                 $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_auth_filter'));
00051 
00052                 // User status filter
00053                 $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter'));
00054 
00055                 // Return the prepared instance
00056                 return $controllerInstance;
00057         }
00058 
00066         public function handleRequest (Requestable $requestInstance, Responseable $responseInstance) {
00067                 // Get the command instance
00068                 $commandInstance = $this->getResolverInstance()->resolveCommandByRequest($requestInstance);
00069 
00070                 // This request was valid! :-D
00071                 $requestInstance->requestIsValid();
00072 
00073                 // Execute the command
00074                 $commandInstance->execute($requestInstance, $responseInstance);
00075 
00076                 // Flush the response out
00077                 $responseInstance->flushBuffer();
00078         }
00079 }
00080 
00081 // [EOF]
00082 ?>

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