Renamed endElement() to finishElement(), see the final implementation in BaseXmlTempl...
[core.git] / inc / classes / main / template / image / class_ImageTemplateEngine.php
index 98203154dda905f7ed8296bc996b87c76b7e9ff8..22262c0952d2ab8ac972b52dc1573a74477f9cf0 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 - 2011 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
  *
@@ -69,7 +69,6 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
        /**
         * Creates an instance of the class TemplateEngine and prepares it for usage
         *
-        * @param       $applicationInstance    A manageable application
         * @return      $templateInstance               An instance of TemplateEngine
         * @throws      BasePathIsEmptyException                If the provided $templateBasePath is empty
         * @throws      InvalidBasePathStringException  If $templateBasePath is no string
@@ -78,10 +77,13 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         * @throws      BasePathReadProtectedException  If $templateBasePath is
         *                                                                                      read-protected
         */
-       public static final function createImageTemplateEngine (ManageableApplication $applicationInstance) {
+       public static final function createImageTemplateEngine () {
                // Get a new instance
                $templateInstance = new ImageTemplateEngine();
 
+               // Get the application instance from registry
+               $applicationInstance = Registry::getRegistry()->getInstance('app');
+
                // Determine base path
                $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getRequestInstance()->getRequestElement('app') . '/';
 
@@ -183,7 +185,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         * @return      void
         * @throws      XmlNodeMismatchException        If current main node mismatches the closing one
         */
-       public function endElement ($resource, $nodeName) {
+       public function finishElement ($resource, $nodeName) {
                // Make all lower-case
                $nodeName = strtolower($nodeName);
 
@@ -318,7 +320,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
        /**
         * "Setter" for image-string. For more details see above method!
         *
-        * @param       $groupable      Wether this image string is groupable
+        * @param       $groupable      Whether this image string is groupable
         * @return      void
         * @see         ImageTemplateEngine::setImageResolution
         */