You are here

public function FrxData::currentContextArray in Forena Reports 7.3

Same name and namespace in other branches
  1. 7.4 FrxData.inc \FrxData::currentContextArray()

Return current context as key value pairs Enter description here

File

./FrxData.inc, line 38

Class

FrxData

Code

public function currentContextArray() {
  $data = $this->cur_context;
  if (is_array($data)) {
    return $data;
  }
  $parms = array();
  if (is_object($data)) {

    // Get attributes
    $data = get_object_vars($data);
    if (method_exists($data, 'attributes')) {
      foreach ($data
        ->attributes() as $key => $value) {
        $data[$key] = (string) $value;
      }
    }
    return $data;
  }
}