]> git.mxchange.org Git - core.git/commitdiff
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 84aaca820f2055682852e51e61930465bd992e54..e604b54c977ce53bfd468a77dd73ab5bed6da882 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);
        }
+
+       /**
+        * 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]