public function sendToDisk($filename) { $this->epilogue(); $filename = Piwik_ReportRenderer::appendExtension($filename, "html"); $outputFilename = Piwik_ReportRenderer::getOutputPath($filename); $emailReport = @fopen($outputFilename, "w"); if (!$emailReport) { throw new Exception("The file : " . $outputFilename . " can not be opened in write mode."); } fwrite($emailReport, $this->rendering); fclose($emailReport); return $outputFilename; }
public function sendToDisk($filename) { $filename = Piwik_ReportRenderer::appendExtension($filename, self::PDF_CONTENT_TYPE); $outputFilename = Piwik_ReportRenderer::getOutputPath($filename); $this->TCPDF->Output($outputFilename, 'F'); return $outputFilename; }