You are here

public function ReportEditor::getCache in Forena Reports 7.5

Same name and namespace in other branches
  1. 8 src/Editor/ReportEditor.php \Drupal\forena\Editor\ReportEditor::getCache()

File

src/Editor/ReportEditor.php, line 584
ReportEditor.inc Wrapper XML class for working with DOM object. It provides helper Enter description here ... @author metzlerd

Class

ReportEditor

Namespace

Drupal\forena\Editor

Code

public function getCache() {
  $dom = $this->dom;
  $this
    ->verifyHeaderElements(array(
    'cache',
  ));
  $opts = $dom
    ->getElementsByTagNameNS($this->xmlns, 'cache')
    ->item(0);
  $ret = array();

  // Simplexml is easier to work with
  $options = simplexml_import_dom($opts);
  foreach ($options
    ->attributes() as $key => $value) {
    $ret[(string) $key] = (string) $value;
  }
  return $ret;
}