All filters rewritten to throw FilterChainException
authorRoland Häder <roland@mxchange.org>
Wed, 11 Mar 2009 03:27:28 +0000 (03:27 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 11 Mar 2009 03:27:28 +0000 (03:27 +0000)
application/ship-simu/main/filter/page/class_RefillPageFilter.php
application/ship-simu/main/filter/validator/class_RefillRequestValidatorFilter.php
application/ship-simu/main/filter/verifier/class_BirthdayVerifierFilter.php

index 1f3d3e8..f77af3f 100644 (file)
@@ -51,6 +51,7 @@ class RefillPageFilter extends BaseShipSimuFilter implements Filterable {
         * @param       $requestInstance        An instance of a class with an Requestable interface
         * @param       $responseInstance       An instance of a class with an Responseable interface
         * @return      void
+        * @throws      FilterChainException    If this filter fails to operate
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                // Execute the parent execute method
@@ -65,7 +66,7 @@ class RefillPageFilter extends BaseShipSimuFilter implements Filterable {
                        $responseInstance->addFatalMessage('refill_page_not_active');
 
                        // Abort here
-                       return false;
+                       throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } // END - if
        }
 }
index 1476a3e..f5ca9e0 100644 (file)
@@ -52,6 +52,7 @@ class RefillRequestValidatorFilter extends BaseShipSimuFilter implements Filtera
         * @param       $responseInstance       An instance of a class with an Responseable interface
         * @return      void
         * @todo        Maybe we need to added some more generic tests on the request here?
+        * @throws      FilterChainException    If this filter fails to operate
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                // Execute the parent execute method
@@ -66,7 +67,7 @@ class RefillRequestValidatorFilter extends BaseShipSimuFilter implements Filtera
                        $responseInstance->addFatalMessage('refill_page_required_fields_missing');
 
                        // Abort here
-                       return false;
+                       throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } // END - if
        }
 }
index db5a026..688f357 100644 (file)
@@ -58,6 +58,7 @@ class BirthdayVerifierFilter extends BaseShipSimuFilter implements Filterable {
                parent::execute($requestInstance, $responseInstance);
 
                // Implement this!
+               $requestInstance->debugInstance();
                $this->partialStub("Please implement this method.");
        }
 }