You are here

public function XMLDocument::header in Forena Reports 7.5

Overrides DocumentTypeBase::header

File

src/DocumentFormats/XMLDocument.php, line 28
HtmlDocument Straight XML document with no wrapping theme. @author davidmetzler

Class

XMLDocument

Namespace

Drupal\forena\DocumentFormats

Code

public function header($r, $print = TRUE) {
  if ($print) {
    header('Content-Type: ' . $this->content_type);
    header('Cache-Control:');
    header('Pragma:');
    header('Cache-Control: must-revalidate');
  }
  $r->html = '<?xml version="1.0"?>' . "\n";
  $opening_tag = $this
    ->_build_opening_root_tag_contents();
  if ($this->root_tag) {
    $r->html .= "<{$opening_tag}>";
  }
}