]> git.mxchange.org Git - core.git/blobdiff - inc/main/classes/filter/class_FilterChain.php
Continued:
[core.git] / inc / main / classes / filter / class_FilterChain.php
index e80c956d88383d933a7a4da57c28fb2ce478a094..994878e37c14a9212ae0650645a653d93be3f312 100644 (file)
@@ -1,10 +1,20 @@
 <?php
+// Own namespace
+namespace CoreFramework\Chain\Filter;
+
+// Import framework stuff
+use CoreFramework\Filter\Filterable;
+use CoreFramework\Object\BaseFrameworkSystem;
+use CoreFramework\Registry\Registerable;
+use CoreFramework\Request\Requestable;
+use CoreFramework\Response\Responseable;
+
 /**
  * A filter chain for pre and post filters
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -107,30 +117,28 @@ class FilterChain extends BaseFrameworkSystem implements Registerable {
         * Process all added filters. Please note that filters must throw
         * FilterChainException if they need to interrupt the filter chain.
         *
-        * @param       $requestInstance        An instance of a request class
-        * @param       $responseInstance       An instance of a response class
+        * @param       $requestInstance        An instance of a Requestable class
+        * @param       $responseInstance       An instance of a Responseable class
         * @return      void
         */
        public function processFilters (Requestable $requestInstance, Responseable $responseInstance) {
                // Run all filters
-               //* DEBUG */ self::createDebugInstance(__CLASS__)->debugOutput('COUNT=' . $this->countGenericArray('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__)->debugOutput('FILTER: ' . $filterInstance->__toString() . ': Processing started.');
+                               //* DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('FILTER: ' . $filterInstance->__toString() . ': Processing started.');
                                $filterInstance->execute($requestInstance, $responseInstance);
-                               //* DEBUG */ self::createDebugInstance(__CLASS__)->debugOutput('FILTER: ' . $filterInstance->__toString() . ': Processing ended.');
+                               //* DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('FILTER: ' . $filterInstance->__toString() . ': Processing ended.');
                        } catch (FilterChainException $e) {
                                // This exception can be thrown to just skip any further processing
-                               self::createDebugInstance(__CLASS__)->debugOutput('Failed to execute lase filter ' . $filterInstance->__toString() . ': ' . $e->getMessage());
+                               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Failed to execute lase filter ' . $filterInstance->__toString() . ': ' . $e->getMessage());
                                break;
                        }
                } // END - foreach
        }
-}
 
-// [EOF]
-?>
+}