]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/template/image/class_ImageTemplateEngine.php
Opps, forgot this.
[core.git] / inc / classes / main / template / image / class_ImageTemplateEngine.php
index d59c91fa191321678f65decf0906339612ec4f78..3b7b8da073dbf88f8593e93965038c55bb1973f5 100644 (file)
@@ -2,11 +2,11 @@
 /**
  * The own template engine for loading caching and sending out images
  *
- * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @author             Roland Haeder <webmaster@shipsimu.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 - 2015 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
+ * @link               http://www.shipsimu.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
@@ -163,10 +163,10 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
                //* DEBUG: */ echo "START: &gt;".$element."&lt;<br />\n";
                if (in_array($element, $this->mainNodes)) {
                        // Okay, main node found!
-                       $methodName = 'setImage' . $this->convertToClassName($element);
+                       $methodName = 'setImage' . self::convertToClassName($element);
                } elseif (in_array($element, $this->subNodes)) {
                        // Sub node found
-                       $methodName = 'setImageProperty' . $this->convertToClassName($element);
+                       $methodName = 'setImageProperty' . self::convertToClassName($element);
                } elseif ($element != 'image') {
                        // Invalid node name found
                        throw new InvalidXmlNodeException(array($this, $element, $attributes), XmlParser::EXCEPTION_XML_NODE_UNKNOWN);
@@ -185,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);
 
@@ -200,7 +200,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
                }
 
                // Construct method name
-               $methodName = 'finish' . $this->convertToClassName($nodeName);
+               $methodName = 'finish' . self::convertToClassName($nodeName);
 
                // Call the corresponding method
                call_user_func_array(array($this->getImageInstance(), $methodName), array());
@@ -221,11 +221,11 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
                // Is this string empty?
                if (empty($characters)) {
                        // Then skip it silently
-                       return false;
+                       return;
                } // END - if
 
                // Unfinished work!
-               $this->partialStub("Handling extra characters is not yet supported!");
+               $this->partialStub('Handling extra characters is not yet supported!');
        }
 
        /**
@@ -252,7 +252,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
                $imageType = $this->compileRawCode($imageType);
 
                // Now make a class name of it
-               $className = $this->convertToClassName($imageType.'_image');
+               $className = self::convertToClassName($imageType.'_image');
 
                // And try to initiate it
                $this->setImageInstance(ObjectFactory::createObjectByName($className, array($this)));
@@ -320,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
         */
@@ -460,7 +460,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         */
        public function getImageCacheFqfn () {
                // Get the FQFN ready
-               $fqfn = sprintf("%s%s%s/%s.%s",
+               $fqfn = sprintf('%s%s%s/%s.%s',
                        $this->getConfigInstance()->getConfigEntry('base_path'),
                        $this->getGenericBasePath(),
                        'images/_cache',