]> git.mxchange.org Git - shipsimu.git/commitdiff
Missing filter class added for refill page, some minor rewrites
authorRoland Häder <roland@mxchange.org>
Sat, 20 Dec 2008 22:53:31 +0000 (22:53 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 20 Dec 2008 22:53:31 +0000 (22:53 +0000)
.gitattributes
application/ship-simu/main/commands/web/class_WebShipsimuRefillCommand.php
application/ship-simu/main/filter/book/.htaccess [new file with mode: 0644]
application/ship-simu/main/filter/book/class_RefillRequestCurrencyBookFilter.php [new file with mode: 0644]
application/ship-simu/main/filter/class_
application/ship-simu/main/filter/class_BaseShipSimuFilter.php
application/ship-simu/main/filter/validator/class_RefillRequestValidatorFilter.php

index 296d56e7db750d98f38304a371b46ceca6c34bc5..8ab3108ef551ce66a84566bcf4574fce4fa16648 100644 (file)
@@ -116,6 +116,8 @@ application/ship-simu/main/drives/motor/class_Motor.php -text
 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/book/.htaccess -text
+application/ship-simu/main/filter/book/class_RefillRequestCurrencyBookFilter.php -text
 application/ship-simu/main/filter/class_ -text
 application/ship-simu/main/filter/class_BaseShipSimuFilter.php -text
 application/ship-simu/main/filter/government/.htaccess -text
index cca8a181727438a033d915f25398ff4f1d40076b..fb7bd40c8e71a3d88bf94ad467573bbdf7b64fa5 100644 (file)
@@ -59,10 +59,10 @@ class WebShipsimuRefillCommand extends BaseCommand implements Commandable {
         * @param       $requestInstance        An instance of a class with an Requestable interface
         * @param       $responseInstance       An instance of a class with an Responseable interface
         * @return      void
-        * @todo        0% done
+        * @todo        We should add something like payment discovery here (where to withdraw, e.g. external API)
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
-               $this->partialStub("Please implement this method.");
+               // Unfinished method
        }
 
        /**
diff --git a/application/ship-simu/main/filter/book/.htaccess b/application/ship-simu/main/filter/book/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/ship-simu/main/filter/book/class_RefillRequestCurrencyBookFilter.php b/application/ship-simu/main/filter/book/class_RefillRequestCurrencyBookFilter.php
new file mode 100644 (file)
index 0000000..7101a82
--- /dev/null
@@ -0,0 +1,65 @@
+<?php
+/**
+ * A filter for currency booking in refill requests
+ *
+ * @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 RefillRequestCurrencyBookFilter extends BaseShipSimuFilter implements Filterable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this filter class
+        *
+        * @return      $filterInstance         An instance of this filter class
+        */
+       public final static function createRefillRequestCurrencyBookFilter () {
+               // Get a new instance
+               $filterInstance = new RefillRequestCurrencyBookFilter();
+
+               // 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
+        * @todo        Add code being executed in this filter
+        */
+       public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+               // Execute the parent execute method
+               parent::execute($requestInstance, $responseInstance);
+
+               $this->partialStub("Add code here for your specific filter.");
+       }
+}
+
+// [EOF]
+?>
index 6a0bb7771b7761e3b3cb8b56807808ca39f3787a..8fec98aaf913bebbcaa6d0c90c07ae215a0e97e3 100644 (file)
@@ -35,7 +35,7 @@ class ???Filter extends BaseShipSimuFilter implements Filterable {
        /**
         * Creates an instance of this filter class
         *
-        * @return      $filterInstance                 An instance of this filter class
+        * @return      $filterInstance         An instance of this filter class
         */
        public final static function create???Filter () {
                // Get a new instance
index 6cc28302d6d4a6c4fbb0bd3e19a4ac7ac793063c..5046c0ecd342b7ed18ffdc2ae06d092855e27769 100644 (file)
@@ -39,7 +39,7 @@ class BaseShipSimuFilter extends BaseFilter {
         * @param       $requestInstance        An instance of a class with an Requestable interface
         * @param       $responseInstance       An instance of a class with an Responseable interface
         * @return      void
-        * @todo        0%
+        * @todo        Add something to do on every filter
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                // Add something to do on every filter
index 43dc7c6256e294206872af46fc79ffb5e9f967af..1476a3e0eb3684a65f4ff910daf6c87e81aaaeed 100644 (file)
@@ -35,7 +35,7 @@ class RefillRequestValidatorFilter extends BaseShipSimuFilter implements Filtera
        /**
         * Creates an instance of this filter class
         *
-        * @return      $filterInstance                 An instance of this filter class
+        * @return      $filterInstance         An instance of this filter class
         */
        public final static function createRefillRequestValidatorFilter () {
                // Get a new instance
@@ -51,7 +51,7 @@ class RefillRequestValidatorFilter extends BaseShipSimuFilter implements Filtera
         * @param       $requestInstance        An instance of a class with an Requestable interface
         * @param       $responseInstance       An instance of a class with an Responseable interface
         * @return      void
-        * @todo        0% done
+        * @todo        Maybe we need to added some more generic tests on the request here?
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                // Execute the parent execute method
@@ -68,9 +68,6 @@ class RefillRequestValidatorFilter extends BaseShipSimuFilter implements Filtera
                        // Abort here
                        return false;
                } // END - if
-
-               // Unfinised part
-               $this->partialStub("Unfinished method.");
        }
 }