class_ImageCodeCaptchaController.php

Go to the documentation of this file.
00001 <?php
00024 class ImageCodeCaptchaController extends BaseController implements Controller {
00030         protected function __construct () {
00031                 // Call parent constructor
00032                 parent::__construct(__CLASS__);
00033         }
00034 
00041         public final static function createImageCodeCaptchaController (CommandResolver $resolverInstance) {
00042                 // Create the instance
00043                 $controllerInstance = new ImageCodeCaptchaController();
00044 
00045                 // Set the command resolver
00046                 $controllerInstance->setResolverInstance($resolverInstance);
00047 
00048                 // Add filter for checking the "encrypt" string
00049                 $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_encrypt_validator_filter'));
00050 
00051                 // Return the prepared instance
00052                 return $controllerInstance;
00053         }
00054 
00062         public function handleRequest (Requestable $requestInstance, Responseable $responseInstance) {
00063                 // Execute pre filters
00064                 $this->executePreFilters($requestInstance, $responseInstance);
00065 
00066                 // Get the command instance
00067                 $commandInstance = $this->getResolverInstance()->resolveCommandByRequest($requestInstance);
00068 
00069                 // This request was valid! :-D
00070                 $requestInstance->requestIsValid();
00071 
00072                 // Execute the command
00073                 $commandInstance->execute($requestInstance, $responseInstance);
00074 
00075                 // Execute post filters
00076                 $this->executePostFilters($requestInstance, $responseInstance);
00077 
00078                 // Flush the response out
00079                 $responseInstance->flushBuffer();
00080         }
00081 }
00082 
00083 // [EOF]
00084 ?>

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