Source for file DownloadResponse.php
Documentation is available at DownloadResponse.php
- 1: <?php
- 3: /**
- 4: * Nette Framework
- 5: *
- 11: */
- 15: /**
- 16: * File download response.
- 17: *
- 20: */
- 22: {
- 34: /**
- 38: */
- 40: {
- 43: }
- 48: }
- 52: /**
- 53: * Returns the path to a downloaded file.
- 55: */
- 57: {
- 59: }
- 63: /**
- 64: * Returns the file name.
- 66: */
- 68: {
- 70: }
- 74: /**
- 75: * Returns the MIME content type of a downloaded file.
- 77: */
- 79: {
- 81: }
- 85: /**
- 86: * Sends response to output.
- 88: */
- 90: {
- 92: Environment::getHttpResponse()->setHeader('Content-Disposition', 'attachment; filename="' . $this->name . '"');
- 94: }
- 96: }