X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=framework%2Fmain%2Fclasses%2Fresponse%2Fimage%2Fclass_ImageResponse.php;h=8be1d27c4da8dc830525265d69f9ac58f9bb73e8;hb=78c80d535ab3e108f8c89f2aae9ebe02270e4d63;hp=8594ca4f6ae605b8045862424298d0a44800daa2;hpb=cad1ab5ecb2935a6ebf678555860c3bd96b525b0;p=core.git diff --git a/framework/main/classes/response/image/class_ImageResponse.php b/framework/main/classes/response/image/class_ImageResponse.php index 8594ca4f..8be1d27c 100644 --- a/framework/main/classes/response/image/class_ImageResponse.php +++ b/framework/main/classes/response/image/class_ImageResponse.php @@ -3,7 +3,9 @@ namespace Org\Mxchange\CoreFramework\Response; // Import framework stuff -use Org\Mxchange\CoreFramework\Registry\Registry; +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; +use Org\Mxchange\CoreFramework\Manager\ManageableApplication; +use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Response\Responseable; /** @@ -11,11 +13,7 @@ use Org\Mxchange\CoreFramework\Response\Responseable; * * @author Roland Haeder * @version 0.0.0 -<<<<<<< HEAD:framework/main/classes/response/image/class_ImageResponse.php - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team -======= - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2016 Core Developer Team ->>>>>>> Some updates::inc/main/classes/response/image/class_ImageResponse.php + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2020 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.shipsimu.org * @@ -70,7 +68,7 @@ class ImageResponse extends BaseResponse implements Responseable { */ public final function initTemplateEngine (ManageableApplication $applicationInstance) { // Get config instance - $cfg = $this->getConfigInstance(); + $cfg = FrameworkBootstrap::getConfigurationInstance(); // Set new template engine $cfg->setConfigEntry('html_template_class' , $cfg->getConfigEntry('image_template_class')); @@ -116,11 +114,11 @@ class ImageResponse extends BaseResponse implements Responseable { // Get all config entries if (is_null($expires)) { - $expires = (time() + $this->getConfigInstance()->getConfigEntry('cookie_expire')); + $expires = (time() + FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('cookie_expire')); } // END - if - $path = $this->getConfigInstance()->getConfigEntry('cookie_path'); - $domain = $this->getConfigInstance()->getConfigEntry('cookie_domain'); + $path = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('cookie_path'); + $domain = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('cookie_domain'); setcookie($cookieName, $cookieValue, $expires); //, $path, $domain, (isset($_SERVER['HTTPS'])) @@ -145,7 +143,7 @@ class ImageResponse extends BaseResponse implements Responseable { */ public function redirectToConfiguredUrl ($configEntry) { // Get application instance - $applicationInstance = Registry::getRegistry()->getInstance('app'); + $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); // Is the header not yet sent? if (headers_sent()) { @@ -154,10 +152,10 @@ class ImageResponse extends BaseResponse implements Responseable { } // END - if // Assign application data - $this->getTemplateInstance()->assignApplicationData($applicationInstance()); + $this->getTemplateInstance()->assignApplicationData($applicationInstance); // Get the url from config - $url = $this->getConfigInstance()->getConfigEntry($configEntry . '_url'); + $url = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry($configEntry . '_url'); // Compile the URL $url = $this->getTemplateInstance()->compileRawCode($url); @@ -168,7 +166,7 @@ class ImageResponse extends BaseResponse implements Responseable { if (substr($url, 0, 1) == '/') $url = substr($url, 1); // No, then extend it with our base URL - $url = $this->getConfigInstance()->getConfigEntry('base_url') . '/' . $url; + $url = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('base_url') . '/' . $url; } // END - if // Add redirect header