*
* But good little boys and girls would always initialize their variables... ;-)
*
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
* @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software
- * @license GNU GPL 3.0 or any newer version
+ * @license GNU GPL 3.0 or any newer version
* @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
// Get some instances
$tpl = FrameworkConfiguration::getInstance()->readConfig('template_class');
$lang = LanguageSystem::getInstance();
- $io = FileIoHandler::getInstance();
// Get response instance
$responseInstance = ApplicationHelper::getInstance()->getResponseInstance();
// Is the template engine loaded?
- if ((class_exists($tpl)) && (is_object($lang)) && (is_object($io))) {
+ if ((class_exists($tpl)) && (is_object($lang))) {
// Use the template engine for putting out (nicer look) the message
try {
// Get the template instance from our object factory
- $templateInstance = ObjectFactory::createObjectByName($tpl, array(FrameworkConfiguration::getInstance()->readConfig('tpl_base_path'), $lang, $io));
+ $templateInstance = ObjectFactory::createObjectByName($tpl, array(ApplicationHelper::getInstance()));
} catch (FrameworkException $e) {
die(sprintf("[Main:] Could not initialize template engine for reason: <span class=\"exception_reason\">%s</span>",
$e->getMessage()
}
// Get and prepare backtrace for output
- // @TODO Rewrite this to something "generic"
$backtraceArray = debug_backtrace();
$backtrace = "";
foreach ($backtraceArray as $key => $trace) {
} // END - if
// Assign variables
- $templateInstance->assignVariable('message' , $message);
- $templateInstance->assignVariable('code' , $code);
- $templateInstance->assignVariable('extra' , $extraData);
- $templateInstance->assignVariable('backtrace' , $backtrace);
+ $templateInstance->assignVariable('message', $message);
+ $templateInstance->assignVariable('code', $code);
+ $templateInstance->assignVariable('extra', $extraData);
+ $templateInstance->assignVariable('backtrace', $backtrace);
$templateInstance->assignVariable('total_includes', ClassLoader::getInstance()->getTotal());
- $templateInstance->assignVariable('total_objects' , ObjectFactory::getTotal());
- $templateInstance->assignVariable('title' , $lang->getMessage('emergency_exit_title'));
+ $templateInstance->assignVariable('total_objects', ObjectFactory::getTotal());
+ $templateInstance->assignVariable('title', $lang->getMessage('emergency_exit_title'));
// Load the template
$templateInstance->loadCodeTemplate('emergency_exit');
* @return void
*/
public static function main () {
- // Some non-global common arrays we need...
- global $_SERVER;
-
// Load config file
require(dirname(__FILE__) . '/inc/config.php');