public static function buildResponseRule( SimpleXMLElement $data)
    {
        $returnValue = null;

	    switch ($data->getName()) {
			case 'exitResponse' : $returnValue = new ExitResponse();
				break;
			case 'setOutcomeValue' :
				$identifier = (string)$data['identifier'];
				$children = array();
				foreach ($data->children() as $child){
					$children[] = $child;
				}
				$expression = ExpressionParserFactory::build(array_shift($children));
				$returnValue = new SetOutcomeVariable($identifier, $expression);
				break;
			case 'responseCondition' :
				$returnValue = self::buildResponseCondition($data);
				break;
			default :
				throw new ParsingException('unknwown element '.$data->getName().' in ResponseProcessing');
		}

        return $returnValue;
    }
public static function buildResponseRule( SimpleXMLElement $data)
    {
        $returnValue = null;

	    switch ($data->getName()) {
			case 'exitResponse' : $returnValue = new ExitResponse();
				break;
			case 'setOutcomeValue' :
				$identifier = (string)$data['identifier'];
				$children = array();
				foreach ($data->children() as $child){
					$children[] = $child;
				}
				$expression = ExpressionParserFactory::build(array_shift($children));
				$returnValue = new SetOutcomeVariable($identifier, $expression);
				break;
			case 'responseCondition' :
				$returnValue = self::buildResponseCondition($data);
				break;
			default :
				throw new ParsingException('unknwown element '.$data->getName().' in ResponseProcessing');
		}

        return $returnValue;
    }
public static function buildResponseRule ( SimpleXMLElement $ data ) { $ returnValue = null ; switch ( $ data -> getName ( ) ) { case 'exitResponse' : $ returnValue = new ExitResponse ( ) ; break ; case 'setOutcomeValue' : $ identifier = ( string ) $ data [ 'identifier' ] ; $ children = array ( ) ; foreach ( $ data -> children ( ) as $ child ) { $ children [ ] = $ child ; } $ expression = ExpressionParserFactory :: build ( array_shift ( $ children ) ) ; $ returnValue = new SetOutcomeVariable ( $ identifier , $ expression ) ; break ; case 'responseCondition' : $ returnValue = self :: buildResponseCondition ( $ data ) ; break ; default : throw new ParsingException ( 'unknwown element ' . $ data -> getName ( ) . ' in ResponseProcessing' ) ; } return $ returnValue ; }
Short description of method buildResponseRule

@access public
@author Joel Bout, <joel.bout@tudor.lu>
@param  SimpleXMLElement data
@return oat\taoQtiItem\model\qti\response\ResponseRule
Short description of method buildResponseRule