/** * 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); }
/** * Get the readable content for this exception */ private function getContent() { $xslFile = APP_DIR . "view/" . Registry::get("PLAIN_TEXT_ERROR") . ".xsl"; $transformation = new Transformation("<root><exceptions>" . $this->getXML() . "</exceptions></root>", $xslFile); return $transformation->execute(); }