Piwik\ReportRenderer::getOutputPath PHP 메소드

getOutputPath() 보호된 정적인 메소드

Return $filename with temp directory and delete file
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;
    }

Usage Example

예제 #1
0
파일: Pdf.php 프로젝트: GovanifY/piwik
 public function sendToDisk($filename)
 {
     $filename = ReportRenderer::makeFilenameWithExtension($filename, self::PDF_CONTENT_TYPE);
     $outputFilename = ReportRenderer::getOutputPath($filename);
     $this->TCPDF->Output($outputFilename, 'F');
     return $outputFilename;
 }