*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
* @license GNU GPL 3.0 or any newer version
* @link http://www.ship-simu.org
*
/**
* Response status
*/
- private $responseStatus = "200 OK";
+ private $responseStatus = '200 OK';
/**
* Array with all headers
/**
* Instance of the template engine
*/
- private $templateInstance = null;
+ private $templateInstance = NULL;
/**
* Fatal resolved messages from filters and so on
protected function __construct ($className) {
// Call parent constructor
parent::__construct($className);
-
- // Clean up a little
- $this->removeNumberFormaters();
- $this->removeSystemArray();
}
/**
*/
public final function addFatalMessage ($messageId) {
// Adds the resolved message id to the fatal message list
- $this->fatalMessages[] = $this->getApplicationInstance()->getLanguageInstance()->getMessage($messageId);
+ array_push($this->fatalMessages, $this->getApplicationInstance()->getLanguageInstance()->getMessage($messageId));
}
/**
*/
public final function addFatalMessagePlain ($message) {
// Adds the resolved message id to the fatal message list
- $this->fatalMessages[] = $message;
+ array_push($this->fatalMessages, $message);
}
/**
* Flushs the cached HTTP response to the outer world
*
- * @param $force Wether we shall force the output or abort if headers are
+ * @param $force Whether we shall force the output or abort if headers are
* already sent with an exception
* @return void
* @throws ResponseHeadersAlreadySentException Thrown if headers are
throw new ResponseHeadersAlreadySentException($this, self::EXCEPTION_HEADERS_ALREADY_SENT);
} elseif (!headers_sent()) {
// Send headers out
- header("HTTP/1.1 {$this->responseStatus}");
+ header('HTTP/1.1 ' . $this->responseStatus);
// Used later
$now = gmdate('D, d M Y H:i:s') . ' GMT';
$this->addHeader('Pragma', 'no-cache'); // HTTP/1.0
// Define the charset to be used
- //$this->addHeader('Content-type:', sprintf("text/html; charset=%s", $this->getConfigInstance()->readConfig('header_charset')));
+ //$this->addHeader('Content-type:', sprintf("text/html; charset=%s", $this->getConfigInstance()->getConfigEntry('header_charset')));
// Send all headers
foreach ($this->responseHeaders as $name => $value) {
- header("{$name}: {$value}");
- //* DEBUG: */ echo "{$name}: {$value}<br />\n";
+ header($name . ': ' . $value);
+ //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('name=' . $name . ',value=' . $value);
} // END - foreach
// Send cookies out?
if (count($this->cookies) > 0) {
// Send all cookies
$cookieString = implode(' ', $this->cookies);
- header("Set-Cookie: {$cookieString}");
+ header('Set-Cookie: ' . $cookieString);
// Remove them all
$this->cookies = array();