Changeset 110

Show
Ignore:
Timestamp:
10/19/07 00:00:36 (11 months ago)
Author:
mikey
Message:

added a fourth way of adding children, this time via the keyAttribute attribute
increased version number to 0.2.1-dev

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/XJConf/converters/AbstractObjectValueConverter.php

    r103 r110  
    120120                if ($class->hasMethod($child->getSetterMethod()) == true) { 
    121121                    $method = $class->getMethod($child->getSetterMethod()); 
     122                } elseif ($class->hasMethod($child->getKey()) == true) { 
     123                    $method = $class->getMethod($child->getKey()); 
    122124                } elseif ($class->hasMethod('__set') == true) { 
    123125                    $method = $class->getMethod('__set'); 
     
    129131                    } 
    130132                     
    131                     throw new ValueConversionException('Could not add attribute "' . $child->getKey() . '" to "' . $this->getType() . '" using "' . $child->getSetterMethod() . '()" or "__set()" or public property "' . $child->getKey() . '", no such method defined.'); 
     133                    throw new ValueConversionException('Could not add child "' . $child->getKey() . '" to "' . $this->getType() . '" using "' . $child->getSetterMethod() . '()" or "' . $child->getKey() . '" or "__set()" or public property "' . $child->getKey() . '", no such method defined.'); 
    132134                } else { 
    133                     throw new ValueConversionException('Could not add attribute "' . $child->getKey() . '" to "' . $this->getType() . '" using "' . $child->getSetterMethod() . '()" or "__set()" or public property "' . $child->getKey() . '", no such method defined.'); 
     135                    throw new ValueConversionException('Could not add child "' . $child->getKey() . '" to "' . $this->getType() . '" using "' . $child->getSetterMethod() . '()" or "' . $child->getKey() . '" or "__set()" or public property "' . $child->getKey() . '", no such method defined.'); 
    134136                } 
    135137                 
     
    140142                } 
    141143            } catch (ReflectionException $re) { 
    142                 throw new ValueConversionException('Could not add child "' . $child->getKey() . '" to "' . $this->getType() . '" using "' . $child->getSetterMethod() . '()" or "__set()" or public property "' . $child->getKey() . '", exception message: "' . $re->getMessage() . '".'); 
     144                throw new ValueConversionException('Could not add child "' . $child->getKey() . '" to "' . $this->getType() . '" using "' . $child->getSetterMethod() . '()" or "' . $child->getKey() . '" or "__set()" or public property "' . $child->getKey() . '", exception message: "' . $re->getMessage() . '".'); 
    143145            } 
    144146        } 
  • trunk/build.php

    r97 r110  
    1515$starArchive->addMetaData('title', 'XJConf for PHP'); 
    1616$starArchive->addMetaData('package', 'net.xjconf'); 
    17 $starArchive->addMetaData('version', '0.2.0-dev'); 
     17$starArchive->addMetaData('version', '0.2.1-dev'); 
    1818$starArchive->addMetaData('author', 'XJConf Development Team <http://php.xjconf.net>'); 
    1919$starArchive->addMetaData('copyright', '© 2007 XJConf Development Team'); 
  • trunk/package.php

    r106 r110  
    2020 * current version 
    2121 */ 
    22 $version = '0.2.0'; 
     22$version = '0.2.1'; 
    2323 
    2424/** 
     
    4242$notes = <<<EOT 
    4343Feature additions: 
    44 - New feature to define abstract tags, which enables yo to define the concrete type in the tag instead of the definition (mikey) 
    45 - It is now possible to define an explicit setter method for character data inside a tag (schst) 
    46 - Added possibility to declare tags as static (schst) 
    47 - Added several unit tests (mikey) 
    48 - Added possibility to package XJConfForPHP as a STAR archive (mikey, schst) 
    49 - Added new value type "xjonf:auto-primitive" to guess the type of a scalar value (schst) 
    50 - Added implicit and explicit call to __set as well as possibility for setting public properties (mikey) 
    51 - Added XJConfFacade for a simplyfied usage of XJConf (mikey) 
    52 Bugfixes: 
    53 - Fixed bug #6: Enable factory methods without parameters in PHP 5.0.x (schst) 
    54 - Fixed bug #7: check, whether factory method can be called statically (schst) 
    55 - Fixed bug: prevent errors in case factory method does not return an instance of an object (mikey) 
     44- Added a fourth way of adding children, this time via the keyAttribute attribute (mikey) 
    5645EOT; 
    5746