*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
- * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplication {
/**
*/
private $shortName = "";
+ /**
+ * Name of the master template
+ */
+ private $masterTemplate = "";
+
/**
* An instance of this class
*/
private static $thisInstance = null;
/**
- * Private constructor
+ * Protected constructor
*
* @return void
*/
- private function __construct () {
+ protected function __construct () {
// Call parent constructor
- parent::constructor(__CLASS__);
-
- // Set description
- $this->setPartDescr("Application-Helper");
-
- // Create an unique ID
- $this->createUniqueID();
+ parent::__construct(__CLASS__);
// Tidy up a little
$this->removeSystemArray();
+ $this->removeNumberFormaters();
}
/**
$this->shortName = $shortName;
}
+ /**
+ * Getter for master template name
+ *
+ * @return $masterTemplate Name of the master template
+ */
+ public final function getMasterTemplate () {
+ return $this->masterTemplate;
+ }
+
/**
* Launcher for the application selector
*
*/
public final function entryPoint () {
// Get a prepared instance of ApplicationSelector
- $selInstance = ApplicationSelector::createApplicationSelector(LanguageSystem::getInstance(), FileIOHandler::getInstance());
+ $selInstance = ApplicationSelector::createApplicationSelector(LanguageSystem::getInstance(), FileIoHandler::getInstance());
// Remove the ignore list from the object
$selInstance->removeDirIgnoreList();
// Insert all application templates
$selInstance->insertApplicationTemplates();
}
+
+ /**
+ * Handle the indexed array of fatal messages and puts them out in an
+ * acceptable fasion
+ *
+ * @param $messageList An array of fatal messages
+ * @return void
+ */
+ public function handleFatalMessages (array $messageList) {
+ die("<pre>".print_r($messageList, true)."</pre>");
+ }
+
+ /**
+ * Assigns application-depending data
+ *
+ * @param $templateInstance An instance of a template engine
+ * @return void
+ */
+ public function assignExtraTemplateData (CompileableTemplate $templateInstance) {
+ // Assign charset
+ $templateInstance->assignConfigVariable('header_charset');
+ }
}
// [EOF]