mirror of
https://github.com/nextcloud/documentation.git
synced 2026-01-04 10:46:21 +07:00
30 lines
698 B
ReStructuredText
30 lines
698 B
ReStructuredText
TextDownloadResponse
|
|
====================
|
|
|
|
|
|
Prompts the user to download the a textfile
|
|
|
|
|
|
.. php:namespace:: OCA\AppFramework\Http
|
|
.. php:class:: TextDownloadResponse
|
|
|
|
|
|
|
|
|
|
.. php:method:: __construct($content, $filename, $contentType)
|
|
|
|
:param string $content: the content that should be written into the file
|
|
:param string $filename: the name that the downloaded file should have
|
|
:param string $contentType: the mimetype that the downloaded file should have
|
|
|
|
|
|
Creates a response that prompts the user to download a file whichcontains the passed string
|
|
|
|
|
|
.. php:method:: render()
|
|
|
|
:returns string: the file contents
|
|
|
|
|
|
Simply sets the headers and returns the file contents
|