addChild($output); return $output; } public function loadFromNode($xmlNode) { foreach ($this->getXmlNodeChildren($xmlNode) as $outputXmlNode) { switch ($this->getXmlNodeName($outputXmlNode)) { case REQUESTOUTPUTDOWNLOAD_NAME : $this->addNewOutput(RequestOutputTypeEnum::DOWNLOAD)->loadFromNode($outputXmlNode); break; case REQUESTOUTPUTDATAMINING_NAME : $this->addNewOutput(RequestOutputTypeEnum::DATAMINING)->loadFromNode($outputXmlNode); break; case REQUESTOUTPUTPLOT_NAME : $this->addNewOutput(RequestOutputTypeEnum::PLOT)->loadFromNode($outputXmlNode); break; case REQUESTOUTPUTSTATISTIC_NAME : $this->addNewOutput(RequestOutputTypeEnum::STATISTIC)->loadFromNode($outputXmlNode); break; default : throw new Exception('Output node not implemented'); } } } } ?>