From: Roland Haeder Date: Tue, 24 Mar 2015 18:18:53 +0000 (+0100) Subject: Output system is now no longer initialized by loading a centralized X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=50f9797564d17e13249983bffbc2b8c37cb1ecd6;p=city.git Output system is now no longer initialized by loading a centralized inc/output.php as this was a stupid idea and sometimes the same application has a console and web part. Updated 'core' and re-enabled shutdown hook. Signed-off-by: Roland Haeder --- diff --git a/application/city/class_ApplicationHelper.php b/application/city/class_ApplicationHelper.php index ca061e4..a9e56fa 100644 --- a/application/city/class_ApplicationHelper.php +++ b/application/city/class_ApplicationHelper.php @@ -153,8 +153,8 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica Registry::getRegistry()->addInstance('app', $this); // Default response is console - $response = $this->getResponseTypeFromSystem(); - $responseType = $this->getResponseTypeFromSystem(); + $response = self::getResponseTypeFromSystem(); + $responseType = self::getResponseTypeFromSystem(); // Create a new request object $requestInstance = ObjectFactory::createObjectByName($this->convertToClassName($response) . 'Request'); @@ -205,7 +205,7 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica $this->getControllerInstance()->handleRequest($requestInstance, $responseInstance); // -------------------------- Shutdown phase -------------------------- - // @TODO $this->getControllerInstance()->executeShutdownFilters($requestInstance, $responseInstance); + $this->getControllerInstance()->executeShutdownFilters($requestInstance, $responseInstance); } /** diff --git a/application/city/init.php b/application/city/init.php index 8d592ce..8f740dc 100644 --- a/application/city/init.php +++ b/application/city/init.php @@ -27,8 +27,8 @@ // Get config instance $cfg = FrameworkConfiguration::getSelfInstance(); -// Initialize output system -require($cfg->getConfigEntry('base_path') . 'inc/output.php'); +// Initialize output system, you can use any class that expands BaseFrameworkSystem +ApplicationHelper::createDebugInstance('ApplicationHelper'); // This application needs a database connection then we have to simply include // the inc/database.php script diff --git a/core b/core index c0922d6..a142fe5 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit c0922d6cccd0fb0f1b5221585748e92d02ad1cee +Subproject commit a142fe5eeaaa17a434c80ea103088558157c43bb