ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
class.ilPHPOutputDelivery.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
25 
35 {
36  use HttpServiceAware;
38 
39 
43  public function start(string $download_file_name, string $mime_type = MimeType::APPLICATION__OCTET_STREAM): void
44  {
45  $settings = new General();
47  $this->ilFileDelivery->setMimeType($mime_type);
48  $this->ilFileDelivery->setDownloadFileName($download_file_name);
49  $this->ilFileDelivery->setDisposition(ilFileDelivery::DISP_ATTACHMENT);
50  $this->ilFileDelivery->setConvertFileNameToAsci($settings->isDownloadWithAsciiFileName());
51  $this->ilFileDelivery->clearBuffer();
52  $this->ilFileDelivery->checkCache();
53  $this->ilFileDelivery->setGeneralHeaders();
54  $this->ilFileDelivery->setShowLastModified(false);
55  $this->ilFileDelivery->setCachingHeaders();
56  }
57 
58 
59  public function stop(): void
60  {
61  $this->ilFileDelivery->close();
62  }
63 }
start(string $download_file_name, string $mime_type=MimeType::APPLICATION__OCTET_STREAM)
trait HttpServiceAware
Trait HttpServiceAware.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static http()
Fetches the global http state from ILIAS.
Class Delivery.
Definition: Delivery.php:39
Class ilPHPOutputDelivery.