class_WebRefillFormCommand.php

Go to the documentation of this file.
00001 <?php
00024 class WebRefillFormCommand extends BaseCommand implements Commandable {
00030         protected function __construct () {
00031                 // Call parent constructor
00032                 parent::__construct(__CLASS__);
00033 
00034                 // Clean up a little
00035                 $this->removeNumberFormaters();
00036                 $this->removeSystemArray();
00037         }
00038 
00045         public final static function createWebRefillFormCommand (CommandResolver $resolverInstance) {
00046                 // Get a new instance
00047                 $commandInstance = new WebRefillFormCommand();
00048 
00049                 // Set the resolver instance
00050                 $commandInstance->setResolverInstance($resolverInstance);
00051 
00052                 // Return the prepared instance
00053                 return $commandInstance;
00054         }
00055 
00064         public function execute (Requestable $requestInstance, Responseable $responseInstance) {
00065                 $this->partialStub("Please implement this method.");
00066         }
00067 
00075         public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
00076                 // Add user auth filter (we don't need an update of the user here because it will be redirected)
00077                 $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_auth_filter'));
00078 
00079                 // Add user status filter here
00080                 $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter'));
00081 
00082                 // Is the refill page active?
00083                 $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('refill_page_filter'));
00084 
00085                 // Verify password
00086                 $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('account_password_filter'));
00087 
00088                 // Verify CAPTCHA code
00089                 $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_refill_verifier_filter'));
00090 
00091                 // Verify refill request
00092                 $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('refill_request_validator_filter'));
00093 
00094                 // Prepare a filter based on the requested type we shall refill
00095                 $filterName = sprintf("refill_request_%s_book_filter", $requestInstance->getRequestElement('type'));
00096 
00097                 // Now, try to load that filter
00098                 $controllerInstance->addPostFilter(ObjectFactory::createObjectByConfiguredName($filterName));
00099         }
00100 }
00101 
00102 // [EOF]
00103 ?>

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