All XML-parsing-related stuff refactured to new XmlParser class
[core.git] / inc / classes / main / images / class_BaseImage.php
index 7f667cde4a48e487d69789dffbdf59532435c32c..f88988bc8798068a99c73030500f2c19d5ae69ff 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, this is free software
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
@@ -25,40 +25,40 @@ class BaseImage extends BaseFrameworkSystem implements Registerable {
        /**
         * Image type
         */
-       private $imageType = "";
+       private $imageType = '';
 
        /**
         * Width of the image
         */
-       private $width = "";
+       private $width = '';
 
        /**
         * Height of the image
         */
-       private $height = "";
+       private $height = '';
 
        /**
         * Background color in RGB
         */
        private $backgroundColor = array(
-               'red'   => "",
-               'green' => "",
-               'blue'  => ""
+               'red'   => '',
+               'green' => '',
+               'blue'  => ''
        );
 
        /**
         * Foreground color in RGB
         */
        private $foregroundColor = array(
-               'red'   => "",
-               'green' => "",
-               'blue'  => ""
+               'red'   => '',
+               'green' => '',
+               'blue'  => ''
        );
 
        /**
         * Current choosen color array
         */
-       private $colorMode = "";
+       private $colorMode = '';
 
        /**
         * Image resource
@@ -68,17 +68,17 @@ class BaseImage extends BaseFrameworkSystem implements Registerable {
        /**
         * Image name
         */
-       private $imageName = "";
+       private $imageName = '';
 
        /**
         * String name
         */
-       private $stringName = "";
+       private $stringName = '';
 
        /**
         * Groupable image strings?
         */
-       private $groupable = "single";
+       private $groupable = 'single';
 
        /**
         * Protected constructor
@@ -89,10 +89,6 @@ class BaseImage extends BaseFrameworkSystem implements Registerable {
        protected function __construct ($className) {
                // Call parent constructor
                parent::__construct($className);
-
-               // Clean up a little
-               $this->removeNumberFormaters();
-               $this->removeSystemArray();
        }
 
        /**
@@ -209,7 +205,7 @@ class BaseImage extends BaseFrameworkSystem implements Registerable {
         * @return      void
         */
        public function initBackgroundColor () {
-               $this->colorMode = "backgroundColor";
+               $this->colorMode = 'backgroundColor';
        }
 
        /**
@@ -228,7 +224,7 @@ class BaseImage extends BaseFrameworkSystem implements Registerable {
         * @return      void
         */
        public function initForegroundColor () {
-               $this->colorMode = "foregroundColor";
+               $this->colorMode = 'foregroundColor';
        }
 
        /**
@@ -248,7 +244,7 @@ class BaseImage extends BaseFrameworkSystem implements Registerable {
         * @return      void
         * @todo        Find something usefull for this method.
         */
-       public function initImageString ($groupable = "single") {
+       public function initImageString ($groupable = 'single') {
                $this->groupable = $groupable;
        }
 
@@ -489,7 +485,7 @@ class BaseImage extends BaseFrameworkSystem implements Registerable {
                $foreColor = imagecolorallocate($this->getImageResource(), $red, $green, $blue);
 
                switch ($this->groupable) {
-                       case "single": // Single image string
+                       case 'single': // Single image string
                                // Compile image string
                                $imageString = $templateInstance->compileRawCode($this->getString());
 
@@ -505,7 +501,7 @@ class BaseImage extends BaseFrameworkSystem implements Registerable {
                                imagestring($this->getImageResource(), $size, $x, $y, $imageString, $foreColor);
                                break;
 
-                       case "groupable": // More than one string allowed
+                       case 'groupable': // More than one string allowed
                                // Walk through all groups
                                foreach ($templateInstance->getVariableGroups() as $group => $set) {
                                        // Set the group