]> git.mxchange.org Git - core.git/commitdiff
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 49ca8b2275e84e14a592381c9588dba498a55692..1eb1bd7ae5026d00d300a4a6edd87a2ef5bcf965 100644 (file)
@@ -60,6 +60,15 @@ class FilterChain extends BaseFrameworkSystem implements Registerable {
                $this->filters[] = $filterInstance;
        }
 
                $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
         *
        /**
         * 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));
        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.');
                        // Try to execute this filter
                        try {
                                //* DEBUG */ $this->debugOutput('FILTER: ' . $filterInstance->__toString() . ': Processing started.');