Prepared for payment database layout
authorRoland Häder <roland@mxchange.org>
Sun, 5 Oct 2008 19:38:16 +0000 (19:38 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 5 Oct 2008 19:38:16 +0000 (19:38 +0000)
application/ship-simu/templates/de/code/action_login_refill.ctp
inc/classes/interfaces/discovery/class_Discoverable.php
inc/classes/main/discovery/class_
inc/classes/main/discovery/payment/class_LocalPaymentDiscovery.php
inc/classes/main/filter/payment/class_PaymentDiscoveryFilter.php

index 136794f4a080cf90507d3cec5bbfbe0ff2d3344b..305c4047aada57efc0b054c5aa1f21fc3dc94043 100644 (file)
@@ -28,6 +28,9 @@ $helper->addInputSelectField('type', "");
 $helper->addFormSubGroup('amount', "Gebe hier in ganzen Zahlen die Menge an, die du nachbestellen willst.");
 $helper->addInputTextField('amount', 1000);
 
 $helper->addFormSubGroup('amount', "Gebe hier in ganzen Zahlen die Menge an, die du nachbestellen willst.");
 $helper->addInputTextField('amount', 1000);
 
+// Add payments
+$helper->getValueInstance()->addResultsToHelper($helper);
+
 // Ask again for current account password
 $helper->addFormGroup('pass_old', "Bitte gebe zur Best&auml;tigung der Nachbestellung dein derzeitiges Passwort ein.");
 $helper->addFieldText('pass_old', "Derzeitiges Passwort:");
 // Ask again for current account password
 $helper->addFormGroup('pass_old', "Bitte gebe zur Best&auml;tigung der Nachbestellung dein derzeitiges Passwort ein.");
 $helper->addFieldText('pass_old', "Derzeitiges Passwort:");
index 8cc62fa7c1d20e68d6495ccebcd3630a0f9bd54b..4aa69e80a5a7c04970ef47d3730ec25d1001f055 100644 (file)
@@ -29,6 +29,14 @@ interface Discoverable extends FrameworkInterface {
         * @return      void
         */
        function discover (Requestable $requestInstance);
         * @return      void
         */
        function discover (Requestable $requestInstance);
+
+       /**
+        * Adds the database result in a human-readable format to the helper class
+        *
+        * @param       $helperInstance         An instance of a helper class
+        * @return      void
+        */
+       function addResultsToHelper (HelpableTemplate $helperInstance);
 }
 
 //
 }
 
 //
index 05a2063df7587f4a58ca0aba46fe9362ad0dc0e8..890d6502e3386c0f5b25eaa050442e43e39fa74a 100644 (file)
@@ -56,10 +56,22 @@ class ???Discovery extends BaseDiscovery implements Discoverable {
         *
         * @param       $requestInstance        An instance of a Requestable class
         * @return      void
         *
         * @param       $requestInstance        An instance of a Requestable class
         * @return      void
+        * @todo        0% done
         */
        public function discover (Requestable $requestInstance) {
                $this->partialStub("Please implement this method.");
        }
         */
        public function discover (Requestable $requestInstance) {
                $this->partialStub("Please implement this method.");
        }
+
+       /**
+        * Adds the database result in a human-readable format to the helper class
+        *
+        * @param       $helperInstance         An instance of a helper class
+        * @return      void
+        * @todo        0% done
+        */
+       public function addResultsToHelper (HelpableTemplate $helperInstance) {
+               $this->partialStub("Please implement this method.");
+       }
 }
 
 // [EOF]
 }
 
 // [EOF]
index 1c46a4f9cc0073a3fff5e5417518266372ea1060..129dd3b14a95a5db094aa6086ec05da822fbeed6 100644 (file)
@@ -23,7 +23,7 @@
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
  * 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 LocalPaymentDiscovery extends BaseDiscovery implements Discoverable {
+class LocalPaymentDiscovery extends BaseDiscovery implements Discoverable, Registerable {
        /**
         * Protected constructor
         *
        /**
         * Protected constructor
         *
@@ -77,6 +77,17 @@ class LocalPaymentDiscovery extends BaseDiscovery implements Discoverable {
                // Set the result instance
                $this->setResultInstance($resultInstance);
        }
                // Set the result instance
                $this->setResultInstance($resultInstance);
        }
+
+       /**
+        * Adds the database result in a human-readable format to the helper class
+        *
+        * @param       $helperInstance         An instance of a helper class
+        * @return      void
+        * @todo        0% done
+        */
+       public function addResultsToHelper (HelpableTemplate $helperInstance) {
+               // Undone part
+       }
 }
 
 // [EOF]
 }
 
 // [EOF]
index 3fc1d3d15770dfc279b8b64293339d1173fcb230..5e22439f8dde0ceabce7b5f37c502b13512b3a90 100644 (file)
@@ -29,11 +29,6 @@ class PaymentDiscoveryFilter extends BaseFrameworkSystem implements Filterable {
         */
        private $actionName = "";
 
         */
        private $actionName = "";
 
-       /**
-        * Instance of a discovery class
-        */
-       private $discoveryInstance = null;
-
        /**
         * Protected constructor
         *
        /**
         * Protected constructor
         *
@@ -97,25 +92,6 @@ class PaymentDiscoveryFilter extends BaseFrameworkSystem implements Filterable {
                return $this->actionName;
        }
 
                return $this->actionName;
        }
 
-       /**
-        * Protected setter for discovery instance
-        *
-        * @param       $discoveryInstance      A discovery instance
-        * @return      void
-        */
-       protected final function setDiscoveryInstance (Discoverable $discoveryInstance) {
-               $this->discoveryInstance = $discoveryInstance;
-       }
-
-       /**
-        * Protected getter for discovery instance
-        *
-        * @return      $discoveryInstance      A discovery instance
-        */
-       public final function getDiscoveryInstance () {
-               return $this->discoveryInstance;
-       }
-
        /**
         * Executes the filter with given request and response objects
         *
        /**
         * Executes the filter with given request and response objects
         *
@@ -134,7 +110,7 @@ class PaymentDiscoveryFilter extends BaseFrameworkSystem implements Filterable {
                        $discoveryInstance->discover($requestInstance);
 
                        // Remember this instance if all wents fine
                        $discoveryInstance->discover($requestInstance);
 
                        // Remember this instance if all wents fine
-                       $this->setDiscoveryInstance($discoveryInstance);
+                       Registry::getRegistry()->addInstance('payments', $discoveryInstance);
                } catch (FrameworkException $e) {
                        // Something bad happend
                        $requestInstance->requestIsValid(false);
                } catch (FrameworkException $e) {
                        // Something bad happend
                        $requestInstance->requestIsValid(false);