You are here

public function FrxEditor::getOptions in Forena Reports 7.3

Same name and namespace in other branches
  1. 7.4 FrxEditor.inc \FrxEditor::getOptions()

Retrieve options element in array form

File

./FrxEditor.inc, line 330
FrxEditor.inc Wrapper XML class for working with DOM object. It provides helper Enter description here ... @author metzlerd

Class

FrxEditor
@file FrxEditor.inc Wrapper XML class for working with DOM object. It provides helper Enter description here ... @author metzlerd

Code

public function getOptions() {
  $dom = $this->dom;
  $this
    ->verifyHeaderElements(array(
    'options',
  ));
  $opts = $dom
    ->getElementsByTagNameNS($this->xmlns, 'options')
    ->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;
}