You are here

public function FrxData::setValue in Forena Reports 7.3

Same name and namespace in other branches
  1. 6.2 FrxData.inc \FrxData::setValue()
  2. 7.2 FrxData.inc \FrxData::setValue()
  3. 7.4 FrxData.inc \FrxData::setValue()

Allows override of a value for the current context.

Parameters

String $key:

String $value:

Overrides FrxContext::setValue

File

./FrxData.inc, line 138

Class

FrxData

Code

public function setValue($key, $value, $context = '') {
  if (is_array($this->cur_context)) {
    $this->cur_context[$key] = $value;
  }
  elseif (is_object($this->cur_context)) {
    if (strpos($key, '@') === 0) {
      $this->cur_context[$key] = $value;
    }
    else {
      $this->cur_context->{$key} = $value;
    }
  }
}