]> git.mxchange.org Git - shipsimu.git/blobdiff - application/selector/class_ApplicationHelper.php
Fixes for image generation
[shipsimu.git] / application / selector / class_ApplicationHelper.php
index 19b45b7ba0d59268304940f3f02f04c880ce25dd..d51ca02ce0454f75e5f1cd1a0973c7d2961ee6c9 100644 (file)
  * Please remember that this include file is being loaded *before* the class
  * loader is loading classes from "exceptions", "interfaces" and "main"!
  *
- * @author     Roland Haeder <roland __NOSPAM__ [at] __REMOVE_ME__ mxchange [dot] org>
- * @version    0.1
+ * @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
+ * @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
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * 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/>.
  */
 class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplication {
        /**
@@ -39,28 +55,28 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
         */
        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();
        }
 
        /**
@@ -90,7 +106,7 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
        /**
         * Setter for the version number
         *
-        * @param               $appVersion     The application's version number
+        * @param       $appVersion     The application's version number
         * @return      void
         */
        public final function setAppVersion ($appVersion) {
@@ -111,7 +127,7 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
        /**
         * Setter for human-readable name
         *
-        * @param               $appName        The application's human-readable name
+        * @param       $appName        The application's human-readable name
         * @return      void
         */
        public final function setAppName ($appName) {
@@ -132,7 +148,7 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
        /**
         * Setter for short uni*-like name
         *
-        * @param               $shortName      The application's short uni*-like name
+        * @param       $shortName      The application's short uni*-like name
         * @return      void
         */
        public final function setAppShortName ($shortName) {
@@ -141,6 +157,15 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
                $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
         *
@@ -149,7 +174,7 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
         */
        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();
@@ -163,6 +188,28 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
                // 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]