ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilPHPOutputDelivery.php
Go to the documentation of this file.
1<?php
2require_once('class.ilFileDelivery.php');
3require_once('Delivery.php');
4require_once './Services/FileDelivery/classes/HttpServiceAware.php';
5
6use ILIAS\FileDelivery\Delivery as Delivery;
8
18{
23 protected $ilFileDelivery;
24
25
30 public function start($download_file_name, $mime_type = ilMimeTypeUtil::APPLICATION__OCTET_STREAM)
31 {
32 global $DIC;
33 $ilClientIniFile = $DIC['ilClientIniFile'];
35 $this->ilFileDelivery->setMimeType($mime_type);
36 $this->ilFileDelivery->setDownloadFileName($download_file_name);
37 $this->ilFileDelivery->setDisposition(ilFileDelivery::DISP_ATTACHMENT);
38 $this->ilFileDelivery->setConvertFileNameToAsci((bool) !$ilClientIniFile->readVariable('file_access', 'disable_ascii'));
39 $this->ilFileDelivery->clearBuffer();
40 $this->ilFileDelivery->checkCache();
41 $this->ilFileDelivery->setGeneralHeaders();
42 $this->ilFileDelivery->setShowLastModified(false);
43 $this->ilFileDelivery->setCachingHeaders();
44 }
45
46
47 public function stop()
48 {
49 $this->ilFileDelivery->close();
50 }
51}
An exception for terminatinating execution or to throw for unit testing.
Class ilFileDelivery.
Class ilPHPOutputDelivery.
start($download_file_name, $mime_type=ilMimeTypeUtil::APPLICATION__OCTET_STREAM)
global $DIC
Definition: goto.php:24
trait HttpServiceAware
Trait HttpServiceAware.
static http()
Fetches the global http state from ILIAS.