public function getHeaders($asAssociative)
{
$contentType = $this->getContentType() . '; charset=' . $this->getCharset();
$contentDisposition = 'attachment; filename=' . $this->getFilename() . '.' . $this->getFileExtension();
$contentLength = strlen($this->getOutput());
$connection = 'close';
if ((bool) $asAssociative) {
return array('Content-type' => $contentType, 'Content-Disposition' => $contentDisposition, 'Content-Length' => $contentLength, 'Connection' => $connection);
}
return array('Content-type: ' . $contentType, 'Content-Disposition: ' . $contentDisposition, 'Content-Length: ' . $contentLength, 'Connection: ' . $connection);
}