protected static getOutputPath ( $filename ) : string | ||
$filename | ||
Результат | string | path of file in temp directory |
protected static function getOutputPath($filename)
{
$outputFilename = StaticContainer::get('path.tmp') . '/assets/' . $filename;
@chmod($outputFilename, 0600);
if (file_exists($outputFilename)) {
@unlink($outputFilename);
}
return $outputFilename;
}
public function sendToDisk($filename) { $filename = ReportRenderer::makeFilenameWithExtension($filename, self::PDF_CONTENT_TYPE); $outputFilename = ReportRenderer::getOutputPath($filename); $this->TCPDF->Output($outputFilename, 'F'); return $outputFilename; }