makeFilenameWithExtension() защищенный статический Метод

Append $extension to $filename
protected static makeFilenameWithExtension ( string $filename, string $extension ) : string
$filename string
$extension string
Результат string filename with extension
Пример #1
0
 public function sendToBrowserInline($filename)
 {
     $filename = ReportRenderer::makeFilenameWithExtension($filename, self::PDF_CONTENT_TYPE);
     $this->TCPDF->Output($filename, 'I');
 }
Пример #2
0
 protected static function sendToBrowser($filename, $extension, $contentType, $content)
 {
     $filename = ReportRenderer::makeFilenameWithExtension($filename, $extension);
     ProxyHttp::overrideCacheControlHeaders();
     header('Content-Description: File Transfer');
     header('Content-Type: ' . $contentType);
     header('Content-Disposition: attachment; filename="' . str_replace('"', '\'', basename($filename)) . '";');
     header('Content-Length: ' . strlen($content));
     echo $content;
 }