]> git.mxchange.org Git - shipsimu.git/blobdiff - inc/classes/main/filter/class_FilterChain.php
CAPTCHA code now gets validated
[shipsimu.git] / inc / classes / main / filter / class_FilterChain.php
index 95450e7171a1878d94b4dba1d2248d7a6b58edd2..7004eb50f4563d5e56639dcabdcfffcab7f20daf 100644 (file)
@@ -28,7 +28,7 @@ class FilterChain extends BaseFrameworkSystem {
        private $filters = array();
 
        /**
-        * Private constructor
+        * Protected constructor
         *
         * @return      void
         */
@@ -37,10 +37,10 @@ class FilterChain extends BaseFrameworkSystem {
                parent::__construct(__CLASS__);
 
                // Set part description
-               $this->setObjectDescription("");
+               $this->setObjectDescription("A filter chain class");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeNumberFormaters();
@@ -81,11 +81,16 @@ class FilterChain extends BaseFrameworkSystem {
                // Run all filters
                //* DEBUG */ echo "COUNT=".count($this->filters)."<br />\n";
                foreach ($this->filters as $filterInstance) {
-                       // Execute this filter
-                       //* DEBUG */ echo "FILTER: ".$filterInstance->__toString().": Processing started.<br />\n";
+                       // Try to execute this filter
+                       try {
+                               //* DEBUG */ echo "FILTER: ".$filterInstance->__toString().": Processing started.<br />\n";
                                $filterInstance->execute($requestInstance, $responseInstance);
-                       //* DEBUG */ echo "FILTER: ".$filterInstance->__toString().": Processing ended.<br />\n";
-               }
+                               //* DEBUG */ echo "FILTER: ".$filterInstance->__toString().": Processing ended.<br />\n";
+                       } catch (FilterChainException $e) {
+                               // This exception can be thrown to just skip any further processing
+                               break;
+                       }
+               } // END - foreach
        }
 }