| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function getDownloadResponse() |
||
| 18 | { |
||
| 19 | return new \WebServCo\Framework\HttpResponse( |
||
| 20 | $this->fileData, |
||
| 21 | 200, |
||
| 22 | [ |
||
| 23 | 'Last-Modified' => gmdate('D, d M Y H:i:s') . ' GMT', |
||
| 24 | 'ETag' => md5($this->fileData), |
||
| 25 | 'Accept-Ranges' => 'bytes', |
||
| 26 | 'Cache-Control' => 'public', |
||
| 27 | 'Content-Description' => 'File Transfer', |
||
| 28 | 'Content-Disposition' => sprintf( |
||
| 29 | 'attachment; filename=%s', |
||
| 30 | $this->fileName |
||
| 31 | ), |
||
| 32 | 'Content-Type' => $this->contentType, |
||
| 33 | 'Content-Transfer-Encoding' => 'binary', |
||
| 34 | 'Connection' => 'close', |
||
| 35 | ] |
||
| 39 |