*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
- * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
* @link http://www.ship-simu.org
*
private $filters = array();
/**
- * Private constructor
+ * Protected constructor
*
* @return void
*/
$this->setObjectDescription("A filter chain class");
// Create unique ID number
- $this->createUniqueID();
+ $this->generateUniqueId();
// Clean up a little
$this->removeNumberFormaters();
// 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
}
}