Changeset 53
- Timestamp:
- 11/29/06 21:10:54 (2 years ago)
- Files:
-
- trunk/XJConf/DefinedTag.php (modified) (1 diff)
- trunk/examples/AnotherClass.php (added)
- trunk/examples/MyClass.php (modified) (1 diff)
- trunk/examples/MyCollector.php (added)
- trunk/examples/TestDynamicTypes.php (added)
- trunk/examples/xml/defines-dynamic-types.xml (added)
- trunk/examples/xml/test-dynamic-types.xml (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/XJConf/DefinedTag.php
r43 r53 266 266 * 267 267 * @param TagDefinition $tagDef 268 * @todo in case of dynamic types the original type should not get lost 269 * but used to check if the dynamic type is as well an instance of 270 * the original type >>> forcing interfaces/inheritance 268 271 */ 269 272 public function setDefinition(TagDefinition $tagDef) 270 273 { 271 $this->tagDef = $tagDef; 274 if ($this->hasAttribute('__type') == false) { 275 $this->tagDef = $tagDef; 276 return; 277 } 278 279 $clonedTagDef = clone $tagDef; 280 $this->tagDef = $clonedTagDef; 281 $this->tagDef->setType($this->getAttribute('__type')); 272 282 } 273 283 trunk/examples/MyClass.php
r41 r53 6 6 * @author Frank Kleine <frank.kleine@schlund.de> 7 7 */ 8 require dirname(__FILE__) . '/MyInterface.php';8 require_once dirname(__FILE__) . '/MyInterface.php'; 9 9 /** 10 10 * Class for example purposes.
