]> git.mxchange.org Git - shipsimu.git/commitdiff
Refill request validator added with stubs
authorRoland Häder <roland@mxchange.org>
Sun, 17 Aug 2008 01:17:58 +0000 (01:17 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 17 Aug 2008 01:17:58 +0000 (01:17 +0000)
.gitattributes
application/ship-simu/config.php
application/ship-simu/main/commands/web/class_WebMoneyRefillFormCommand.php
application/ship-simu/main/filter/class_MoneyRefillRequestValidatorFilter.php [new file with mode: 0644]

index eaa20f66a9e890b5fcf0f08e3af9fa832e8cc172..bd57ad41c6103a8bf229c63a5338d9250fea8723 100644 (file)
@@ -141,6 +141,7 @@ application/ship-simu/main/factories/.htaccess -text
 application/ship-simu/main/factories/class_ShipSimuWebNewsFactory.php -text
 application/ship-simu/main/filter/.htaccess -text
 application/ship-simu/main/filter/class_MoneyRefillPageFilter.php -text
+application/ship-simu/main/filter/class_MoneyRefillRequestValidatorFilter.php -text
 application/ship-simu/main/goverment/.htaccess -text
 application/ship-simu/main/goverment/class_SimplifiedGoverment.php -text
 application/ship-simu/main/login/.htaccess -text
index 75e555d22693a0adb7543e695f77d1031e906e4e..c4b60938681218ebaa32315f5b4014f4771edeb9 100644 (file)
@@ -142,6 +142,9 @@ $cfg->setConfigEntry('user_status_confirmed_class', "UserStatusConfimedUpdateFil
 // CFG: CAPTCHA-ENCRYPT-VALIDATOR-CLASS
 $cfg->setConfigEntry('captcha_encrypt_validator_class', "CaptchaEncryptFilter");
 
+// CFG: REFILL-REQUEST-VALIDATOR-CLASS
+$cfg->setConfigEntry('refill_request_validator_class', "MoneyRefillRequestValidatorFilter");
+
 // CFG: CAPTCHA-GUEST-VERIFIER-CLASS
 $cfg->setConfigEntry('captcha_guest_verifier_class', "GraphicalCodeCaptchaVerifierFilter");
 
index 1fa33d45905107b0ff6c423c05f147d9fe9715de..dc25f257a1195263cda459fb994fdb541e4b0289 100644 (file)
@@ -83,6 +83,9 @@ class WebMoneyRefillFormCommand extends BaseCommand implements Commandable {
 
                // Verify CAPTCHA code
                $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_refill_verifier_class'));
+
+               // Verify refill request
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('refill_request_validator_class'));
        }
 }
 
diff --git a/application/ship-simu/main/filter/class_MoneyRefillRequestValidatorFilter.php b/application/ship-simu/main/filter/class_MoneyRefillRequestValidatorFilter.php
new file mode 100644 (file)
index 0000000..cea1ba6
--- /dev/null
@@ -0,0 +1,65 @@
+<?php
+/**
+ * A filter for validating the refill request
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @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
+ *
+ * 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
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * 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 MoneyRefillRequestValidatorFilter extends BaseFrameworkSystem implements Filterable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+
+               // Clean up a little
+               $this->removeNumberFormaters();
+               $this->removeSystemArray();
+       }
+
+       /**
+        * Creates an instance of this filter class
+        *
+        * @return      $filterInstance         An instance of this filter class
+        */
+       public final static function createMoneyRefillRequestValidatorFilter () {
+               // Get a new instance
+               $filterInstance = new MoneyRefillRequestValidatorFilter();
+
+               // Return the instance
+               return $filterInstance;
+       }
+
+       /**
+        * Executes the filter with given request and response objects
+        *
+        * @param       $requestInstance        An instance of a class with an Requestable interface
+        * @param       $responseInstance       An instance of a class with an Responseable interface
+        * @return      void
+        */
+       public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+               $this->partialStub("Please implement this method.");
+       }
+}
+
+// [EOF]
+?>