| 1 | <?php |
||
| 22 | class TextDownloadResponse extends DownloadResponse { |
||
| 23 | |||
| 24 | private $content; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Creates a response that prompts the user to download a file which |
||
| 28 | * contains the passed string |
||
| 29 | * @param string $content the content that should be written into the file |
||
| 30 | * @param string $filename the name that the downloaded file should have |
||
| 31 | * @param string $contentType the mimetype that the downloaded file should |
||
| 32 | * have |
||
| 33 | */ |
||
| 34 | public function __construct($content, $filename, $contentType){ |
||
| 38 | |||
| 39 | |||
| 40 | /** |
||
| 41 | * Simply sets the headers and returns the file contents |
||
| 42 | * @return string the file contents |
||
| 43 | */ |
||
| 44 | public function render(){ |
||
| 47 | |||
| 48 | |||
| 49 | } |
||
| 50 |