Some documentary updated
[core.git] / inc / classes / main / template / menu / class_MenuTemplateEngine.php
index 0b29878a6a53a759ff469a1b33555cb56a4c5825..b67f7207d6bf6da2270ad2a86f41d1b8044b9e76 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
@@ -85,9 +85,9 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
        /**
         * Creates an instance of the class TemplateEngine and prepares it for usage
         *
-        * @param       $appInstance    A manageable application
-        * @param       $menuInstance   A RenderableMenu instance
-        * @return      $templateInstance       An instance of TemplateEngine
+        * @param       $applicationInstance    A manageable application
+        * @param       $menuInstance                   A RenderableMenu instance
+        * @return      $templateInstance               An instance of TemplateEngine
         * @throws      BasePathIsEmptyException                If the provided $templateBasePath is empty
         * @throws      InvalidBasePathStringException  If $templateBasePath is no string
         * @throws      BasePathIsNoDirectoryException  If $templateBasePath is no
@@ -95,16 +95,12 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
         * @throws      BasePathReadProtectedException  If $templateBasePath is
         *                                                                                      read-protected
         */
-       public static final function createMenuTemplateEngine (ManageableApplication $appInstance, RenderableMenu $menuInstance) {
+       public static final function createMenuTemplateEngine (ManageableApplication $applicationInstance, RenderableMenu $menuInstance) {
                // Get a new instance
                $templateInstance = new MenuTemplateEngine();
 
-               // Get language and file I/O instances from application
-               $langInstance = $appInstance->getLanguageInstance();
-               $ioInstance = $appInstance->getFileIoInstance();
-
                // Determine base path
-               $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $appInstance->getRequestInstance()->getRequestElement('app') . '/';
+               $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getRequestInstance()->getRequestElement('app') . '/';
 
                // Is the base path valid?
                if (empty($templateBasePath)) {
@@ -124,10 +120,6 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                // Set the base path
                $templateInstance->setTemplateBasePath($templateBasePath);
 
-               // Set the language and IO instances
-               $templateInstance->setLanguageInstance($langInstance);
-               $templateInstance->setFileIoInstance($ioInstance);
-
                // Set template extensions
                $templateInstance->setRawTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('raw_template_extension'));
                $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('menu_template_extension'));
@@ -303,10 +295,10 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                        // Then load it
                        $templateInstance->loadMenuTemplate($templateDependency);
 
-                       // Get an XmlParser instance
+                       // Parse the XML content
                        $templateInstance->renderXmlContent();
 
-                       // Parse the template's content contents
+                       // Save the parsed raw content in our dependency array
                        $this->dependencyContent[$node] = $templateInstance->getRawTemplateData();
                } // END - if
        }
@@ -332,7 +324,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
        /**
         * Starts the menu entries
         *
-        * @param       $templateDependency     A template to load to satisfy dependencies
+        * @param       $templateDependency             A template to load to satisfy dependencies
         * @return      void
         */
        private function startEntryList () {