Changeset 251

Show
Ignore:
Timestamp:
02/10/07 16:24:22 (2 years ago)
Author:
mikey
Message:

renamed bootstrap file for net.stubbles.reflection
removed tabs

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/net/stubbles/ioc/injection/Inject.php

    r97 r251  
    77 * @subpackage  ioc 
    88 */ 
    9 stubClassLoader::load('net.stubbles.reflection.stubReflection', 
     9stubClassLoader::load('net.stubbles.reflection.reflection', 
    1010                      'net.stubbles.ioc.injection.InjectionException', 
    1111                      'net.stubbles.ioc.injection.InjectionMap' 
  • trunk/src/main/php/net/stubbles/xml/serializer/stubXMLSerializer.php

    r223 r251  
    1313                      'net.stubbles.xml.serializer.annotations.stubXMLMethodsAnnotation', 
    1414                      'net.stubbles.xml.serializer.annotations.stubXMLMatcherAnnotation', 
    15                       'net.stubbles.reflection.stubReflection'); 
     15                      'net.stubbles.reflection.reflection'); 
    1616 
    1717/** 
     
    139139                continue; 
    140140            } 
    141            if ($property->hasAnnotation('XMLIgnore')) { 
    142                continue; 
    143            
    144            if (null !== $matcher && !$matcher->matches($property->getName())) { 
    145                continue; 
    146            
    147  
    148                $propValue = $property->getValue($object); 
    149            if ($property->hasAnnotation('XMLAttribute')) { 
    150                $xmlAttribute = $property->getAnnotation('XMLAttribute'); 
    151                $xmlWriter->writeAttribute($xmlAttribute->getAttributeName(), (string)$propValue); 
    152                continue; 
    153            
    154            if ($property->hasAnnotation('XMLTag')) { 
    155                $xmlTag = $property->getAnnotation('XMLTag'); 
    156                $tagName = $xmlTag->getTagName(); 
    157                $elementName = $xmlTag->getElementTagName(); 
    158            } else { 
    159                $tagName = $property->getName(); 
    160                $elementName = null; 
    161            
    162  
    163            if (is_array($propValue)) { 
    164                    $this->serializeArray($propValue, $xmlWriter, $tagName, $elementName); 
    165            } else { 
     141            if ($property->hasAnnotation('XMLIgnore')) { 
     142                continue; 
     143           
     144            if (null !== $matcher && !$matcher->matches($property->getName())) { 
     145                continue; 
     146           
     147 
     148            $propValue = $property->getValue($object); 
     149            if ($property->hasAnnotation('XMLAttribute')) { 
     150                $xmlAttribute = $property->getAnnotation('XMLAttribute'); 
     151                $xmlWriter->writeAttribute($xmlAttribute->getAttributeName(), (string)$propValue); 
     152                continue; 
     153           
     154            if ($property->hasAnnotation('XMLTag')) { 
     155                $xmlTag = $property->getAnnotation('XMLTag'); 
     156                $tagName = $xmlTag->getTagName(); 
     157                $elementName = $xmlTag->getElementTagName(); 
     158            } else { 
     159                $tagName = $property->getName(); 
     160                $elementName = null; 
     161           
     162 
     163            if (is_array($propValue)) { 
     164                $this->serializeArray($propValue, $xmlWriter, $tagName, $elementName); 
     165            } else { 
    166166                $this->serializeDispatcher($propValue, $xmlWriter, $tagName); 
    167            } 
     167            } 
    168168        } 
    169169 
     
    191191                continue; 
    192192            } 
    193            if ($method->hasAnnotation('XMLIgnore')) { 
    194                continue; 
    195            
    196            if (null !== $matcher && !$matcher->matches($method->getName())) { 
    197                continue; 
    198            
    199  
    200  
    201                $returnValue = $method->invoke($object); 
    202            if ($method->hasAnnotation('XMLAttribute')) { 
    203                $xmlAttribute = $method->getAnnotation('XMLAttribute'); 
    204                $xmlWriter->writeAttribute($xmlAttribute->getAttributeName(), (string)$returnValue); 
    205                continue; 
    206            
    207            if ($method->hasAnnotation('XMLTag')) { 
    208                $xmlTag = $method->getAnnotation('XMLTag'); 
    209                $tagName = $xmlTag->getTagName(); 
    210                $elementName = $xmlTag->getElementTagName(); 
    211            } else { 
    212                $tagName = $method->getName(); 
    213                $elementName = null; 
    214            
    215  
    216            if (is_array($returnValue)) { 
    217                    $this->serializeArray($returnValue, $xmlWriter, $tagName, $elementName); 
    218            } else { 
     193            if ($method->hasAnnotation('XMLIgnore')) { 
     194                continue; 
     195           
     196            if (null !== $matcher && !$matcher->matches($method->getName())) { 
     197                continue; 
     198           
     199 
     200 
     201            $returnValue = $method->invoke($object); 
     202            if ($method->hasAnnotation('XMLAttribute')) { 
     203                $xmlAttribute = $method->getAnnotation('XMLAttribute'); 
     204                $xmlWriter->writeAttribute($xmlAttribute->getAttributeName(), (string)$returnValue); 
     205                continue; 
     206           
     207            if ($method->hasAnnotation('XMLTag')) { 
     208                $xmlTag = $method->getAnnotation('XMLTag'); 
     209                $tagName = $xmlTag->getTagName(); 
     210                $elementName = $xmlTag->getElementTagName(); 
     211            } else { 
     212                $tagName = $method->getName(); 
     213                $elementName = null; 
     214           
     215 
     216            if (is_array($returnValue)) { 
     217                $this->serializeArray($returnValue, $xmlWriter, $tagName, $elementName); 
     218            } else { 
    219219                $this->serializeDispatcher($returnValue, $xmlWriter, $tagName); 
    220            } 
     220            } 
    221221        } 
    222222        $xmlWriter->writeEndElement(); 
     
    239239            if (is_int($key)) { 
    240240                if (null === $defaultTag) { 
    241                   $this->serializeDispatcher($value, $xmlWriter); 
     241                   $this->serializeDispatcher($value, $xmlWriter); 
    242242                } else { 
    243                    $this->serializeDispatcher($value, $xmlWriter, $defaultTag); 
    244                 } 
    245             } else { 
    246                $this->serializeDispatcher($value, $xmlWriter, $key); 
     243                    $this->serializeDispatcher($value, $xmlWriter, $defaultTag); 
     244                } 
     245            } else { 
     246                $this->serializeDispatcher($value, $xmlWriter, $key); 
    247247            } 
    248248        }