Changeset 20

Show
Ignore:
Timestamp:
08/28/06 16:41:38 (2 years ago)
Author:
mikey
Message:

moved $className from ConstructorValueConverter? to AbstractObjectValueConverter? to prevent possible bugs in other classes which extend AbstractObjectValueConverter?

Files:

Legend:

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

    r16 r20  
    11<?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 */ 
    28XJConfLoader::load('converters.ValueConverter', 
    39                   'exceptions.ValueConversionException' 
    410); 
    511/** 
    6  * Class to convert a value to an object 
     12 * Base class to convert a value to an object. 
    713 * 
    8  * @author Stephan Schmidt <stephan.schmidt@schlund.de> 
     14 * @package     XJConf 
     15 * @subpackage  converters 
    916 */ 
    10 abstract class AbstractObjectValueConverter implements ValueConverter { 
    11  
     17abstract class AbstractObjectValueConverter implements ValueConverter 
     18
     19    /** 
     20     * Name of the target class 
     21     * 
     22     * @var  string 
     23     */ 
     24    protected $className; 
     25     
    1226    /** 
    1327     * Add all attributes using the appropriate setter methods 
     
    5165        } 
    5266 
    53         $class = new ReflectionClass($this->getType()); 
     67        $class = new ReflectionClass($this->getType()); 
    5468        foreach ($children as $child) { 
    5569            if (in_array($child->getName(), $ignore) == true) { 
  • trunk/XJConf/converters/ConstructorValueConverter.php

    r16 r20  
    11<?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 */ 
    28XJConfLoader::load('converters.ValueConverter', 
    39                   'converters.AbstractObjectValueConverter', 
     
    612); 
    713/** 
    8  * Class to convert a value to an object 
     14 * Class to convert a value to an object using the constructor of the object. 
    915 * 
    10  * @author Stephan Schmidt <stephan.schmidt@schlund.de> 
     16 * @package     XJConf 
     17 * @subpackage  converters 
    1118 */ 
    1219class ConstructorValueConverter extends AbstractObjectValueConverter implements ValueConverter 
    1320{ 
    14     /** 
    15      * Name of the target class 
    16      * 
    17      * @var  string 
    18      */ 
    19     protected $className; 
    20  
    2121    /** 
    2222     * Create a new converter