19declare(strict_types=1);
42 $this->
http->saveResponse($this->
http->response()->withBody(
45 $this->
http->sendResponse();
52 $string = json_encode(
$data);
56 ->withAddedHeader(
'Content-Type',
'application/json')
58 $http->sendResponse();
65 string $mime =
"application/octet-stream"
72 $delivery->setSendMimeType(
true);
74 $delivery->setDownloadFileName(
$filename);
75 $delivery->setConvertFileNameToAsci(
true);
77 $this->
http->saveResponse($repsonse);
84 string $mime =
"application/octet-stream"
91 $delivery->setSendMimeType(
true);
93 $delivery->setDownloadFileName(
$filename);
94 $delivery->setConvertFileNameToAsci(
true);
95 $repsonse = $this->
http->response()->withBody($stream);
96 $this->
http->saveResponse($repsonse);
setMimeType(string $mime_type)
Stream factory which enables the user to create streams without the knowledge of the concrete class.
static ofString(string $string)
Creates a new stream with an initial value.
deliverString(string $data, string $filename, string $mime="application/octet-stream")
sendString(string $output)
sendJson(\stdClass $data)
deliverStream(FileStream $stream, string $filename, string $mime="application/octet-stream")
__construct(HTTP\Services $http)
The base interface for all filesystem streams.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...