You are here

public function XMLDocument::__construct in Forena Reports 7.5

File

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

Class

XMLDocument

Namespace

Drupal\forena\DocumentFormats

Code

public function __construct() {
  $this->allowDirectOutput = TRUE;
  $this->content_type = 'application/xml';
  $skin = \Frx::Data()
    ->getContext('skin');
  if (isset($skin['XMLDocument']['rootElementName'])) {
    $this->root_tag = $skin['XMLDocument']['rootElementName'];
    if ($this->root_tag == 'none') {
      $this->root_tag = '';
    }
  }
  if (isset($skin['XMLDocument']['rootElementAttributes'])) {
    if (is_array($skin['XMLDocument']['rootElementAttributes'])) {
      $this->root_attributes = $skin['XMLDocument']['rootElementAttributes'];
    }
  }
}