/**
* 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
//* DEBUG: */ echo "START: >".$element."<<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);
* @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);
}
// 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());
// 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!');
}
/**
$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)));
/**
* "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
*/
*/
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',