public function downloadContent($content, $suggestedFilename, $mimeType = null) {
		// if no MIME type has been provided explicitly
		if ($mimeType === null) {
			// use a reasonable default value
			$mimeType = 'application/octet-stream';
		}

		// send the appropriate response headers for the download
		self::sendDownloadHeaders($mimeType, $suggestedFilename, strlen($content));

		// send the actual content
		echo $content;
	}
public function downloadContent($content, $suggestedFilename, $mimeType = null) {
		// if no MIME type has been provided explicitly
		if ($mimeType === null) {
			// use a reasonable default value
			$mimeType = 'application/octet-stream';
		}

		// send the appropriate response headers for the download
		self::sendDownloadHeaders($mimeType, $suggestedFilename, strlen($content));

		// send the actual content
		echo $content;
	}
public function downloadContent ( $ content , $ suggestedFilename , $ mimeType = null ) { // if no MIME type has been provided explicitly if ( $ mimeType === null ) { // use a reasonable default value $ mimeType = 'application/octet-stream' ; } // send the appropriate response headers for the download self :: sendDownloadHeaders ( $ mimeType , $ suggestedFilename , strlen ( $ content ) ) ; // send the actual content echo $ content ; }
Sends the specified content to the client and prompts a file download

@param string $content the content that should be downloaded
@param string $suggestedFilename the suggested name to save the file with (including an extension), e.g. `my-document.txt`
@param string|null $mimeType (optional) the MIME type for the download, e.g. `text/plain`
Sends the specified content to the client and prompts a file download