Added shutdown filter methods.
authorRoland Haeder <roland@mxchange.org>
Sun, 5 Apr 2015 22:04:53 +0000 (00:04 +0200)
committerRoland Haeder <roland@mxchange.org>
Sun, 5 Apr 2015 22:04:53 +0000 (00:04 +0200)
Signed-off-by: Roland H├Ąder <roland@mxchange.org>
inc/classes/main/controller/class_BaseController.php

index 84aaca8..e604b54 100644 (file)
@@ -153,6 +153,27 @@ class BaseController extends BaseFrameworkSystem implements Registerable {
                // Execute all post filters
                $this->executeFilters(self::FILTER_CHAIN_POST_COMMAND, $requestInstance, $responseInstance);
        }
                // Execute all post filters
                $this->executeFilters(self::FILTER_CHAIN_POST_COMMAND, $requestInstance, $responseInstance);
        }
+
+       /**
+        * 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]
 }
 
 // [EOF]