Commented out debug lines added
authorRoland Häder <roland@mxchange.org>
Mon, 3 Aug 2009 23:17:55 +0000 (23:17 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 3 Aug 2009 23:17:55 +0000 (23:17 +0000)
inc/classes/main/controller/class_BaseController.php

index 95827c5e89eeb3ce87638972f9994ff6433e8471..9e1c43e0b419c51f9a2744df22a6a50c552972ef 100644 (file)
@@ -61,26 +61,31 @@ class BaseController extends BaseFrameworkSystem implements Registerable {
         * @return      void
         */
        protected function initFilterChain ($filterChain) {
+               //* DEBUG: */ $this->debugOutput('CONTROLLER: ' . $filterChain . ' init: START');
                $this->filterChains[$filterChain] = ObjectFactory::createObjectByConfiguredName('filter_chain_class');
+               //* DEBUG: */ $this->debugOutput('CONTROLLER: ' . $filterChain . ' init: FINISHED');
        }
 
        /**
-        * Adds a filter to a given filter group
+        * Adds a filter to a given filter chain
         *
-        * @param       $filterGroup    Group of the filter
+        * @param       $filterChain    Chain of the filter
         * @param       $filterInstance         An instance of a filter
         * @return      void
         * @throws      InvalidFilterChainException     If the filter chain is invalid
         */
-       protected function addFilter ($filterGroup, Filterable $filterInstance) {
+       protected function addFilter ($filterChain, Filterable $filterInstance) {
+               //* DEBUG: */ $this->debugOutput('CONTROLLER: ' . $filterChain . ',' . $filterInstance->__toString(). ' add: START');
+
                // Test if the filter is there
-               if (!isset($this->filterChains[$filterGroup])) {
+               if (!isset($this->filterChains[$filterChain])) {
                        // Throw an exception here
-                       throw new InvalidFilterChainException(array($this, $filterGroup), self::EXCEPTION_FILTER_CHAIN_INVALID);
+                       throw new InvalidFilterChainException(array($this, $filterChain), self::EXCEPTION_FILTER_CHAIN_INVALID);
                } // END - if
 
                // Add the filter
-               $this->filterChains[$filterGroup]->addFilter($filterInstance);
+               $this->filterChains[$filterChain]->addFilter($filterInstance);
+               //* DEBUG: */ $this->debugOutput('CONTROLLER: ' . $filterChain . ',' . $filterInstance->__toString(). ' add: FINISH');
        }
 
        /**
@@ -106,23 +111,23 @@ class BaseController extends BaseFrameworkSystem implements Registerable {
        }
 
        /**
-        * Executes given filter chain group
+        * Executes given filter chain chain
         *
-        * @param       $filterGroup    Group of the filter to execute
+        * @param       $filterChain            Chain of the filter to execute
         * @param       $requestInstance        An instance of a request class
         * @param       $responseInstance       An instance of a response class
         * @return      void
         * @throws      InvalidFilterChainException     If the filter chain is invalid
         */
-       protected function executeFilters ($filterGroup, Requestable $requestInstance, Responseable $responseInstance) {
+       protected function executeFilters ($filterChain, Requestable $requestInstance, Responseable $responseInstance) {
                // Test if the filter is there
-               if (!isset($this->filterChains[$filterGroup])) {
+               if (!isset($this->filterChains[$filterChain])) {
                        // Throw an exception here
-                       throw new InvalidFilterChainException(array($this, $filterGroup), self::EXCEPTION_FILTER_CHAIN_INVALID);
+                       throw new InvalidFilterChainException(array($this, $filterChain), self::EXCEPTION_FILTER_CHAIN_INVALID);
                } // END - if
 
                // Run all filters
-               $this->filterChains[$filterGroup]->processFilters($requestInstance, $responseInstance);
+               $this->filterChains[$filterChain]->processFilters($requestInstance, $responseInstance);
        }
 
        /**