function setContentType($type, $charset = NULL);
/** * Sends response to output. * @return void */ public function send(Nette\Http\IRequest $httpRequest, Nette\Http\IResponse $httpResponse) { if ($this->charset !== null) { $httpResponse->setContentType($this->contentType); $httpResponse->setContentType($this->contentType . ';charset=' . $this->charset); } else { $httpResponse->setContentType($this->contentType); } $httpResponse->setHeader('Content-Disposition', 'attachment; filename="' . $this->name . '"'); $length = strlen($this->data); $httpResponse->setHeader('Content-Length', $length); echo $this->data; }