]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/response/html/class_HtmlResponse.php
Continued:
[core.git] / framework / main / classes / response / html / class_HtmlResponse.php
index 2cba458d512eda014f79a205bc30b555edc5a607..9ef39d644d782eb69fdc57e4302186d6eaccc173 100644 (file)
@@ -4,6 +4,7 @@ namespace Org\Mxchange\CoreFramework\Response;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
 use Org\Mxchange\CoreFramework\Manager\ManageableApplication;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 use Org\Mxchange\CoreFramework\Response\Responseable;
@@ -70,7 +71,6 @@ class HtmlResponse extends BaseResponse implements Responseable {
         * @return      void
         * @throws      ResponseHeadersAlreadySentException             If headers are already sent
         * @todo        Encryption of cookie data not yet supported.
-        * @todo        Why are these parameters conflicting?
         * @todo        If the return statement is removed and setcookie() commented out,
         * @todo        this will send only one cookie out, the first one.
         */
@@ -123,7 +123,7 @@ class HtmlResponse extends BaseResponse implements Responseable {
         */
        public function redirectToConfiguredUrl ($configEntry) {
                // Get application instance
-               $applicationInstance = GenericRegistry::getRegistry()->getInstance('application');
+               $applicationInstance = ApplicationHelper::getSelfInstance();
 
                // Is the header not yet sent?
                if (headers_sent()) {
@@ -173,7 +173,7 @@ class HtmlResponse extends BaseResponse implements Responseable {
         * @param       $cookieName             Cookie to expire
         * @return      void
         */
-       public function expireCookie ($cookieName) {
+       public function expireCookie (string $cookieName) {
                // Is the cookie there?
                if (isset($_COOKIE[$cookieName])) {
                        // Then expire it with 20 minutes past
@@ -190,7 +190,7 @@ class HtmlResponse extends BaseResponse implements Responseable {
         * @param       $cookieName             Cookie to refresh
         * @return      void
         */
-       public function refreshCookie ($cookieName) {
+       public function refreshCookie (string $cookieName) {
                // Only update existing cookies
                if (isset($_COOKIE[$cookieName])) {
                        // Update the cookie