]> git.mxchange.org Git - city.git/commitdiff
Possibly the HTML version won't have any shutdown filter, but let's see.
authorRoland Haeder <roland@mxchange.org>
Wed, 25 Mar 2015 08:35:16 +0000 (09:35 +0100)
committerRoland Haeder <roland@mxchange.org>
Wed, 25 Mar 2015 08:35:16 +0000 (09:35 +0100)
Signed-off-by: Roland Haeder <roland@mxchange.org>
application/city/main/controller/html/class_CityHtmlDefaultNewsController.php

index b8c2fd5bdd300695690d65feff5d34b0d4f14a12..63071a9ae24077abb0c198ac4c4584e2b72a0d74 100644 (file)
@@ -30,6 +30,11 @@ class CityHtmlDefaultNewsController extends BaseController implements Controller
        protected function __construct () {
                // Call parent constructor
                parent::__construct(__CLASS__);
+
+               // Init additional filter chains
+               foreach (array('shutdown') as $filterChain) {
+                       $this->initFilterChain($filterChain);
+               } // END - foreach
        }
 
        /**
@@ -82,6 +87,27 @@ class CityHtmlDefaultNewsController extends BaseController implements Controller
                // Flush the response out
                $responseInstance->flushBuffer();
        }
+
+       /**
+        * Add a shutdown filter
+        *
+        * @param       $filterInstance         A Filterable class
+        * @return      void
+        */
+       public function addShutdownFilter (Filterable $filterInstance) {
+               $this->addFilter('shutdown', $filterInstance);
+       }
+
+       /**
+        * Executes all shutdown filters
+        *
+        * @param       $requestInstance        A Requestable class
+        * @param       $responseInstance       A Responseable class
+        * @return      void
+        */
+       public function executeShutdownFilters (Requestable $requestInstance, Responseable $responseInstance) {
+               $this->executeFilters('shutdown', $requestInstance, $responseInstance);
+       }
 }
 
 // [EOF]