use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
use Org\Mxchange\CoreFramework\Manager\ManageableApplication;
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;
use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
use Org\Mxchange\CoreFramework\Response\Responseable;
// Throw an exception here
//* DEBUG: */ return;
throw new ResponseHeadersAlreadySentException($this, self::EXCEPTION_HEADERS_ALREADY_SENT);
// Throw an exception here
//* DEBUG: */ return;
throw new ResponseHeadersAlreadySentException($this, self::EXCEPTION_HEADERS_ALREADY_SENT);
// Get all config entries
if (is_null($expires)) {
$expires = (time() + FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('cookie_expire'));
// Get all config entries
if (is_null($expires)) {
$expires = (time() + FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('cookie_expire'));
$path = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('cookie_path');
$domain = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('cookie_domain');
$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);
if (headers_sent()) {
// Throw an exception here
throw new ResponseHeadersAlreadySentException($this, self::EXCEPTION_HEADERS_ALREADY_SENT);
// Assign application data
$this->getTemplateInstance()->assignApplicationData($applicationInstance);
// 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);
// Is there a / in front of the relative URL?
if (substr($url, 0, 1) == '/') {
$url = substr($url, 1);
// No, then extend it with our base URL
$url = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('base_url') . '/' . $url;
// No, then extend it with our base URL
$url = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('base_url') . '/' . $url;
// Add redirect header
$this->addHeader('Location', str_replace('&', '&', $url));
// Add redirect header
$this->addHeader('Location', str_replace('&', '&', $url));
if (isset($_COOKIE[$cookieName])) {
// Update the cookie
$this->addCookie($cookieName, $_COOKIE[$cookieName], false);
if (isset($_COOKIE[$cookieName])) {
// Update the cookie
$this->addCookie($cookieName, $_COOKIE[$cookieName], false);