Example #1
0
 /**
  * Document this if implementing.
  * 
  * @param DOMDocument   $xslFo    The FO
  * @param sfWebResponse $response The Response.
  * 
  * @return string The output 
  * @see Renderer::renderReport()
  */
 public function renderReport(DOMDocument $xslFo, sfWebResponse $response = null)
 {
     $out = parent::renderReport($xslFo);
     self::$_xPath = new DOMXPath($xslFo);
     $fileName = self::$_xPath->query('//fo:title');
     $fileName = 'Report' . (string) $fileName->item(0) . '-' . date('Y-m-d');
     header("Content-type: application/octet-stream");
     header("Content-Disposition: attachment; filename={$fileName}.xls");
     header("Pragma: no-cache");
     header("Expires: 0");
     return $out;
 }