public function replace(InteractionResponseProcessing $newInteractionResponseProcessing){
        $oldkey = null;
        foreach($this->components as $key => $component){
            if($component->getResponse() == $newInteractionResponseProcessing->getResponse()){
                $oldkey = $key;
                break;
            }
        }
        if(!is_null($oldkey)){
            unset($this->components[$oldkey]);
        }else{
            common_Logger::w('Component to be replaced not found', array('TAOITEMS', 'QTI'));
        }
        $this->add($newInteractionResponseProcessing);
    }
public function replace(InteractionResponseProcessing $newInteractionResponseProcessing){
        $oldkey = null;
        foreach($this->components as $key => $component){
            if($component->getResponse() == $newInteractionResponseProcessing->getResponse()){
                $oldkey = $key;
                break;
            }
        }
        if(!is_null($oldkey)){
            unset($this->components[$oldkey]);
        }else{
            common_Logger::w('Component to be replaced not found', array('TAOITEMS', 'QTI'));
        }
        $this->add($newInteractionResponseProcessing);
    }
public function replace ( InteractionResponseProcessing $ newInteractionResponseProcessing ) { $ oldkey = null ; foreach ( $ this -> components as $ key => $ component ) { if ( $ component -> getResponse ( ) == $ newInteractionResponseProcessing -> getResponse ( ) ) { $ oldkey = $ key ; break ; } } if ( ! is_null ( $ oldkey ) ) { unset ( $ this -> components [ $ oldkey ] ) ; } else { common_Logger :: w ( 'Component to be replaced not found' , array ( 'TAOITEMS' , 'QTI' ) ) ; } $ this -> add ( $ newInteractionResponseProcessing ) ; }
Short description of method replace

@access public
@author Joel Bout, <joel.bout@tudor.lu>
@param  InteractionResponseProcessing newInteractionResponseProcessing
@return mixed
Short description of method replace