Changeset 706

Show
Ignore:
Timestamp:
06/05/07 21:04:10 (1 year ago)
Author:
schst
Message:

Do not export hash_code() and getClassName() to XML

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/net/stubbles/stubBaseObject.php

    r698 r706  
    33 * base class for all other stubbles classes except static ones and classes 
    44 * extending php built-in classes 
    5  *  
     5 * 
    66 * @author   Frank Kleine  <mikey@stubbles.net> 
    77 * @package  stubbles 
     
    1010 * base class for all other stubbles classes except static ones and classes 
    1111 * extending php built-in classes 
    12  *  
     12 * 
    1313 * @package  stubbles 
    1414 */ 
     
    4545     * 
    4646     * @return  string 
     47     * @XMLIgnore 
    4748     */ 
    4849    public function getClassName() 
     
    5556     * 
    5657     * @return  string 
     58     * @XMLIgnore 
    5759     */ 
    5860    public function hashCode() 
     
    7375            return ($this->hashCode() == $compare->hashCode()); 
    7476        } 
    75          
     77 
    7678        return false; 
    7779    } 
     
    7981    /** 
    8082     * returns a string representation of the class 
    81      *  
     83     * 
    8284     * The result is a short but informative representation about the class and 
    8385     * its values. Per default, this method returns: 
     
    102104    /** 
    103105     * returns a string representation of the class 
    104      *  
     106     * 
    105107     * The result is a short but informative representation about the class and 
    106108     * its values. Per default, this method returns: 
     
    129131            $properties = get_object_vars($object); 
    130132        } 
    131          
     133 
    132134        $string = $object->getClassName() . " {\n"; 
    133135        foreach ($properties as $name => $value) { 
     
    135137                continue; 
    136138            } 
    137              
     139 
    138140            $string .= '    ' . $name . '(' . self::determineType($value) . '): '; 
    139141            if (($value instanceof self) == false) { 
     
    141143                continue; 
    142144            } 
    143              
     145 
    144146            $lines       = explode("\n", (string) $value); 
    145147            $lineCounter = 0; 
     
    148150                    continue; 
    149151                } 
    150                  
     152 
    151153                if (0 != $lineCounter) { 
    152154                    $string .= '    ' . $line . "\n"; 
     
    154156                    $string .= $line . "\n"; 
    155157                } 
    156                  
     158 
    157159                $lineCounter++; 
    158160            } 
    159161        } 
    160          
     162 
    161163        $string .= "}\n"; 
    162164        return $string; 
     
    175177                 return gettype($value); 
    176178             } 
    177               
     179 
    178180             return 'resource[' . get_resource_type($value) . ']'; 
    179181         } 
    180           
     182 
    181183         if ($value instanceof stubObject) { 
    182184             return $value->getClassName(); 
    183185         } 
    184           
     186 
    185187         return get_class($value); 
    186188    }