// 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
+ }
// For slow browsers set the cookie array element first
$_COOKIE[$cookieName] = $cookieValue;
// 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');
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);
// 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));
// Remove it from array
unset($_COOKIE[$cookieName]);
- } // END - if
+ }
}
/**
if (isset($_COOKIE[$cookieName])) {
// Update the cookie
$this->addCookie($cookieName, $_COOKIE[$cookieName], false);
- } // END - if
+ }
}
}