namespace Org\Mxchange\CoreFramework\Chain\Filter;
// Import framework stuff
+use Org\Mxchange\CoreFramework\Filter\Chain\FilterChainException;
use Org\Mxchange\CoreFramework\Filter\Filterable;
use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
use Org\Mxchange\CoreFramework\Registry\Registerable;
*
* @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2023 Core Developer Team
* @license GNU GPL 3.0 or any newer version
* @link http://www.shipsimu.org
*
*
* @return void
*/
- protected function __construct () {
+ private function __construct () {
// Call parent constructor
parent::__construct(__CLASS__);
}
*/
protected function getFilters () {
// Default is nothing found
- $filters = array();
+ $filters = [];
// Are some filters set?
if ($this->isValidGenericArrayKey('filters', 'generic', 'dummy')) {
// Then get them
$filters = $this->getGenericArrayKey('filters', 'generic', 'dummy');
- } // END - if
+ }
// Return it
return $filters;
*/
protected function getPostFilters () {
// Default is nothing found
- $filters = array();
+ $filters = [];
// Are some filters set?
if ($this->isValidGenericArrayKey('filters', 'post', 'dummy')) {
// Then get them
$filters = $this->getGenericArrayKey('filters', 'post', 'dummy');
- } // END - if
+ }
// Return it
return $filters;
// Run all filters
//* DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('COUNT=' . $this->countGenericArray('filters'));
foreach ($this->getFilters() as $filterInstance) {
- // Must be an instance of Filterable
- assert($filterInstance instanceof Filterable);
-
// Try to execute this filter
try {
//* DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('FILTER: ' . $filterInstance->__toString() . ': Processing started.');
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Failed to execute lase filter ' . $filterInstance->__toString() . ': ' . $e->getMessage());
break;
}
- } // END - foreach
+ }
}
}