From: Roland Haeder Date: Sun, 5 Apr 2015 22:04:53 +0000 (+0200) Subject: Added shutdown filter methods. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=33df9198674ca343b89dee4f0b8ec0808171cd85;p=core.git Added shutdown filter methods. Signed-off-by: Roland Häder --- 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]