Changeset 16
- Timestamp:
- 08/27/06 23:14:29 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/XJConf/converters/AbstractObjectValueConverter.php
r14 r16 9 9 */ 10 10 abstract class AbstractObjectValueConverter implements ValueConverter { 11 12 11 13 12 /** … … 45 44 * @throws ValueConversionException 46 45 */ 47 protected function addChildrenToValue(Tag $tag, Definition $def, $instance ) {46 protected function addChildrenToValue(Tag $tag, Definition $def, $instance, $ignore = array()) { 48 47 // traverse all children 49 48 $children = $tag->getChildren(); … … 52 51 } 53 52 54 // $ignore = $tag->get->constructor->getUsedChildrenNames();55 $ignore = array();56 53 $class = new ReflectionClass($this->getType()); 57 58 54 foreach ($children as $child) { 59 55 if (in_array($child->getName(), $ignore) == true) { 60 56 continue; 61 57 } 62 63 58 try { 64 59 $class->getMethod($child->getSetterMethod())->invoke($instance, $child->getConvertedValue()); trunk/XJConf/converters/ConstructorValueConverter.php
r15 r16 68 68 $this->addAttributesToValue($tag, $def, $instance); 69 69 } 70 $this->addChildrenToValue($tag, $def, $instance);70 $this->addChildrenToValue($tag, $def, $instance, $constructor->getUsedChildrenNames()); 71 71 72 72 return $instance;
