X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=framework%2Fmain%2Fclasses%2Fresponse%2Fhtml%2Fclass_HtmlResponse.php;h=b81a30a9f84f6ce187a078b76d529917fc1020ab;hb=f861d6bc00f8a3ecf6b057f2aa93129572643896;hp=ebfb0a261da8d9213d646107dcb0ee8d49f0457f;hpb=53bf33122fffeedc46ea50c84cbbdd9e2aabd45d;p=core.git diff --git a/framework/main/classes/response/html/class_HtmlResponse.php b/framework/main/classes/response/html/class_HtmlResponse.php index ebfb0a26..b81a30a9 100644 --- a/framework/main/classes/response/html/class_HtmlResponse.php +++ b/framework/main/classes/response/html/class_HtmlResponse.php @@ -6,6 +6,7 @@ namespace Org\Mxchange\CoreFramework\Response; use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Manager\ManageableApplication; +use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -14,7 +15,7 @@ use Org\Mxchange\CoreFramework\Response\Responseable; * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2021 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2023 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.shipsimu.org * @@ -81,13 +82,13 @@ class HtmlResponse extends BaseResponse implements Responseable { // Throw an exception here //* DEBUG: */ return; throw new ResponseHeadersAlreadySentException($this, self::EXCEPTION_HEADERS_ALREADY_SENT); - } // END - if + } // Shall we encrypt the cookie? if ($encrypted) { // Unsupported at the moment - $this->partialStub('Encryption is unsupported at the moment.'); - } // END - if + DebugMiddleware::getSelfInstance()->partialStub('Encryption is unsupported at the moment.'); + } // For slow browsers set the cookie array element first $_COOKIE[$cookieName] = $cookieValue; @@ -95,7 +96,7 @@ class HtmlResponse extends BaseResponse implements Responseable { // Get all config entries if (is_null($expires)) { $expires = (time() + FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('cookie_expire')); - } // END - if + } $path = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('cookie_path'); $domain = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('cookie_domain'); @@ -129,7 +130,7 @@ class HtmlResponse extends BaseResponse implements Responseable { if (headers_sent()) { // Throw an exception here throw new ResponseHeadersAlreadySentException($this, self::EXCEPTION_HEADERS_ALREADY_SENT); - } // END - if + } // Assign application data $this->getTemplateInstance()->assignApplicationData($applicationInstance); @@ -145,11 +146,11 @@ class HtmlResponse extends BaseResponse implements Responseable { // Is there a / in front of the relative URL? if (substr($url, 0, 1) == '/') { $url = substr($url, 1); - } // END - if + } // No, then extend it with our base URL $url = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('base_url') . '/' . $url; - } // END - if + } // Add redirect header $this->addHeader('Location', str_replace('&', '&', $url)); @@ -181,7 +182,7 @@ class HtmlResponse extends BaseResponse implements Responseable { // Remove it from array unset($_COOKIE[$cookieName]); - } // END - if + } } /** @@ -195,7 +196,7 @@ class HtmlResponse extends BaseResponse implements Responseable { if (isset($_COOKIE[$cookieName])) { // Update the cookie $this->addCookie($cookieName, $_COOKIE[$cookieName], false); - } // END - if + } } }