Added FilterChain::getFilters()
authorRoland Häder <roland@mxchange.org>
Mon, 14 May 2012 20:56:41 +0000 (20:56 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 14 May 2012 20:56:41 +0000 (20:56 +0000)
inc/classes/main/filter/class_FilterChain.php

index 49ca8b2..1eb1bd7 100644 (file)
@@ -60,6 +60,15 @@ class FilterChain extends BaseFrameworkSystem implements Registerable {
                $this->filters[] = $filterInstance;
        }
 
+       /**
+        * Getter for filters array
+        *
+        * @return      $filters        The filters array holding all filter instances
+        */
+       protected function getFilters () {
+               return $this->filters;
+       }
+
        /**
         * Process all added filters
         *
@@ -70,7 +79,7 @@ class FilterChain extends BaseFrameworkSystem implements Registerable {
        public function processFilters (Requestable $requestInstance, Responseable $responseInstance) {
                // Run all filters
                //* DEBUG */ $this->debugOutput('COUNT=' . count($this->filters));
-               foreach ($this->filters as $filterInstance) {
+               foreach ($this->getFilters() as $filterInstance) {
                        // Try to execute this filter
                        try {
                                //* DEBUG */ $this->debugOutput('FILTER: ' . $filterInstance->__toString() . ': Processing started.');