From 33df9198674ca343b89dee4f0b8ec0808171cd85 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Mon, 6 Apr 2015 00:04:53 +0200 Subject: [PATCH] Added shutdown filter methods. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../main/controller/class_BaseController.php | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/inc/classes/main/controller/class_BaseController.php b/inc/classes/main/controller/class_BaseController.php index 84aaca82..e604b54c 100644 --- a/inc/classes/main/controller/class_BaseController.php +++ b/inc/classes/main/controller/class_BaseController.php @@ -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] -- 2.39.5