Changeset 20
- Timestamp:
- 08/28/06 16:41:38 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/XJConf/converters/AbstractObjectValueConverter.php
r16 r20 1 1 <?php 2 /** 3 * Base class to convert a value to an object. 4 * 5 * @author Stephan Schmidt <stephan.schmidt@schlund.de> 6 * @author Frank Kleine <frank.kleine@schlund.de> 7 */ 2 8 XJConfLoader::load('converters.ValueConverter', 3 9 'exceptions.ValueConversionException' 4 10 ); 5 11 /** 6 * Class to convert a value to an object12 * Base class to convert a value to an object. 7 13 * 8 * @author Stephan Schmidt <stephan.schmidt@schlund.de> 14 * @package XJConf 15 * @subpackage converters 9 16 */ 10 abstract class AbstractObjectValueConverter implements ValueConverter { 11 17 abstract class AbstractObjectValueConverter implements ValueConverter 18 { 19 /** 20 * Name of the target class 21 * 22 * @var string 23 */ 24 protected $className; 25 12 26 /** 13 27 * Add all attributes using the appropriate setter methods … … 51 65 } 52 66 53 $class = new ReflectionClass($this->getType());67 $class = new ReflectionClass($this->getType()); 54 68 foreach ($children as $child) { 55 69 if (in_array($child->getName(), $ignore) == true) { trunk/XJConf/converters/ConstructorValueConverter.php
r16 r20 1 1 <?php 2 /** 3 * Class to convert a value to an object using the constructor of the object. 4 * 5 * @author Stephan Schmidt <stephan.schmidt@schlund.de> 6 * @author Frank Kleine <frank.kleine@schlund.de> 7 */ 2 8 XJConfLoader::load('converters.ValueConverter', 3 9 'converters.AbstractObjectValueConverter', … … 6 12 ); 7 13 /** 8 * Class to convert a value to an object 14 * Class to convert a value to an object using the constructor of the object. 9 15 * 10 * @author Stephan Schmidt <stephan.schmidt@schlund.de> 16 * @package XJConf 17 * @subpackage converters 11 18 */ 12 19 class ConstructorValueConverter extends AbstractObjectValueConverter implements ValueConverter 13 20 { 14 /**15 * Name of the target class16 *17 * @var string18 */19 protected $className;20 21 21 /** 22 22 * Create a new converter
