Prepared for payment database layout
[shipsimu.git] / inc / classes / main / filter / payment / class_PaymentDiscoveryFilter.php
index 3fc1d3d15770dfc279b8b64293339d1173fcb230..5e22439f8dde0ceabce7b5f37c502b13512b3a90 100644 (file)
@@ -29,11 +29,6 @@ class PaymentDiscoveryFilter extends BaseFrameworkSystem implements Filterable {
         */
        private $actionName = "";
 
-       /**
-        * Instance of a discovery class
-        */
-       private $discoveryInstance = null;
-
        /**
         * Protected constructor
         *
@@ -97,25 +92,6 @@ class PaymentDiscoveryFilter extends BaseFrameworkSystem implements Filterable {
                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
         *
@@ -134,7 +110,7 @@ class PaymentDiscoveryFilter extends BaseFrameworkSystem implements Filterable {
                        $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);