X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Ftemplate%2Fimage%2Fclass_ImageTemplateEngine.php;h=3b7b8da073dbf88f8593e93965038c55bb1973f5;hp=d59c91fa191321678f65decf0906339612ec4f78;hb=5203f9bd014ad46fbc7ee54e7223dcd46e14e3b4;hpb=36a96a3b68cb6da4e1b431fbc5983821de918618 diff --git a/inc/classes/main/template/image/class_ImageTemplateEngine.php b/inc/classes/main/template/image/class_ImageTemplateEngine.php index d59c91fa..3b7b8da0 100644 --- a/inc/classes/main/template/image/class_ImageTemplateEngine.php +++ b/inc/classes/main/template/image/class_ImageTemplateEngine.php @@ -2,11 +2,11 @@ /** * The own template engine for loading caching and sending out images * - * @author Roland Haeder + * @author Roland Haeder * @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: >".$element."<
\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',