Ejemplo n.º 1
0
 /**
  * Default implementation for the iHtmlReportView interface. Responsible
  * for appending a file extention to the file name, getting the output
  * from the provided view, saving that output to a file, and storing the
  * finished file name in the Report object.
  *
  * Can be overrriden if custom behavior is necessary.
  *
  * @see iHtmlReportView
  * @param ReportHtmlView $htmlView
  */
 public function saveHtmlOutput(ReportHtmlView $htmlView)
 {
     // Add the proper extension
     $fileName = $this->fileName . '.html';
     $fileResult = file_put_contents($fileName, $htmlView->show());
     if ($fileResult === FALSE) {
         //TODO throw exception
     }
     // Save the file name to the report
     $this->report->setHtmlOutputFilename($fileName);
     $this->report->save();
 }