19 declare(strict_types=1);
33 protected const MIME_TYPE_MAP = __DIR__ .
'/../../../FileUpload/src/mime_type_map.php';
42 if (is_readable(self::MIME_TYPE_MAP)) {
43 $map = include self::MIME_TYPE_MAP;
45 $this->mime_type_map = $map ?? [];
50 ?
string $path_to_delete =
null 52 $sender =
function () use ($r):
void {
53 $this->
http->saveResponse($r);
54 $this->
http->sendResponse();
58 if ($path_to_delete !==
null && file_exists($path_to_delete)) {
59 ignore_user_abort(
true);
69 unlink($path_to_delete);
81 ): ResponseInterface {
82 $r = $r->withHeader(
'X-ILIAS-FileDelivery-Method', $this->response_builder->getName());
91 date(
"D, j M Y H:i:s", strtotime(
'+5 days')) .
" GMT" __construct(protected Services $http, protected ResponseBuilder $response_builder, protected ResponseBuilder $fallback_response_builder,)
setGeneralHeaders(ResponseInterface $r, string $uri, string $mime_type, string $file_name, Disposition $disposition=Disposition::INLINE)
saveAndClose(ResponseInterface $r, ?string $path_to_delete=null)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static http()
Fetches the global http state from ILIAS.