]> git.mxchange.org Git - shipsimu.git/commitdiff
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 1f3d3e88f5ad5b3339791dc56200b072f09a4fa1..f77af3f0a28337abffa4502082aab4f7ba2c0d0a 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
         * @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
         */
        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
                        $responseInstance->addFatalMessage('refill_page_not_active');
 
                        // Abort here
-                       return false;
+                       throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } // END - if
        }
 }
                } // END - if
        }
 }
index 1476a3e0eb3684a65f4ff910daf6c87e81aaaeed..f5ca9e0f902cea95de53f5df1a215d591f457dcd 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?
         * @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
         */
        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
                        $responseInstance->addFatalMessage('refill_page_required_fields_missing');
 
                        // Abort here
-                       return false;
+                       throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } // END - if
        }
 }
                } // END - if
        }
 }
index db5a026db6928205a9a0029c40d236a9455a3469..688f3578382e0260e6edc37b427375c5253385ff 100644 (file)
@@ -58,6 +58,7 @@ class BirthdayVerifierFilter extends BaseShipSimuFilter implements Filterable {
                parent::execute($requestInstance, $responseInstance);
 
                // Implement this!
                parent::execute($requestInstance, $responseInstance);
 
                // Implement this!
+               $requestInstance->debugInstance();
                $this->partialStub("Please implement this method.");
        }
 }
                $this->partialStub("Please implement this method.");
        }
 }