/** * Build the transformation and output */ public function execute() { if ($this->outputMode == self::OUTPUT_OFF) { return; //nothing to do } if ($this->outputMode == self::OUTPUT_XML_RAW) { if (!headers_sent()) { header("content-type: text/xml"); } return $this->data; } $xml = $this->generateXML(); $transformation = new Transformation($xml, $this->template); if ($this->outputMode == self::OUTPUT_XML) { if (!headers_sent()) { header("content-type: text/xml"); } return $transformation->getXML(); } return $transformation->execute($this->parameters); }