server/lib/public/appframework/http/datadownloadresponse.php
Morris Jobke 06aef4e8b1 Revert "Updating license headers"
This reverts commit 6a1a4880f0.
2015-02-26 11:37:37 +01:00

42 lines
937 B
PHP

<?php
/**
* @author Georg Ehrke
* @copyright 2014 Georg Ehrke <georg@ownCloud.com>
*
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
namespace OCP\AppFramework\Http;
class DataDownloadResponse extends DownloadResponse {
/**
* @var string
*/
private $data;
/**
* Creates a response that prompts the user to download the text
* @param string $data text to be downloaded
* @param string $filename the name that the downloaded file should have
* @param string $contentType the mimetype that the downloaded file should have
*/
public function __construct($data, $filename, $contentType) {
$this->data = $data;
parent::__construct($filename, $contentType);
}
/**
* @param string $data
*/
public function setData($data) {
$this->data = $data;
}
/**
* @return string
*/
public function render() {
return $this->data;
}
}