]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/controller/class_BaseController.php
Added shutdown filter methods.
[core.git] / inc / classes / main / controller / class_BaseController.php
index 28c8de1bc54b0249abb7ca80b676ef4d5105ba38..e604b54c977ce53bfd468a77dd73ab5bed6da882 100644 (file)
@@ -4,11 +4,11 @@
  * write your own controller. You get the advantage that you can use the pre and
  * post filters.
  *
- * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
+ * @link               http://www.shipsimu.org
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -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]