Source for file DownloadResponse.php
Documentation is available at DownloadResponse.php
- 1: <?php
- 3: /**
- 4: * Nette Framework
- 5: *
- 6: * Copyright (c) 2004, 2009 David Grudl (http://davidgrudl.com)
- 7: *
- 8: * This source file is subject to the "Nette license" that is bundled
- 9: * with this package in the file license.txt.
- 10: *
- 11: * For more information please see http://nettephp.com
- 12: *
- 18: */
- 28: /**
- 29: * File download response.
- 30: *
- 34: */
- 36: {
- 48: /**
- 52: */
- 54: {
- 57: }
- 62: }
- 66: /**
- 67: * Returns the path to an downloaded file.
- 69: */
- 71: {
- 73: }
- 77: /**
- 78: * Returns the file name.
- 80: */
- 82: {
- 84: }
- 88: /**
- 89: * Returns the MIME content type of an downloaded file.
- 91: */
- 93: {
- 95: }
- 99: /**
- 100: * Sends response to output.
- 102: */
- 104: {
- 106: Environment::getHttpResponse()->setHeader('Content-Disposition', 'attachment; filename="' . $this->name . '"');
- 108: }
- 110: }