123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <?php
- namespace OCP\AppFramework\Http;
- use OCP\AppFramework\Http;
- class DataDisplayResponse extends Response {
-
- protected $data;
-
- public function __construct(string $data = '', int $statusCode = Http::STATUS_OK, array $headers = []) {
- parent::__construct($statusCode, $headers);
- $this->data = $data;
- $this->addHeader('Content-Disposition', 'inline; filename=""');
- }
-
- public function render() {
- return $this->data;
- }
-
- public function setData($data) {
- $this->data = $data;
- return $this;
- }
-
- public function getData() {
- return $this->data;
- }
- }
|