You are here

public static function Frx::Context in Forena Reports 7.3

Same name and namespace in other branches
  1. 7.5 Frx.inc \Frx::Context()
  2. 7.4 Frx.inc \Frx::Context()

Factory object to get the context based on a name. IF the context doesn't exist we assume the default data context (FrxData).

Parameters

$context string:

Return value

FrxContext

1 call to Frx::Context()
FrxSyntaxEngine::get_value in ./FrxSyntaxEngine.inc
Get the value from the data. This is used by token_replace method to extract the data based on the path provided.

File

./Frx.inc, line 258
Frx.incL General Forena Reporting Class

Class

Frx

Code

public static function Context($context) {
  $o = NULL;

  // Instantiate the class if it exists
  if ($context) {
    $o = Frx::PluginInstance('FrxContext', $context);
  }

  // Otherwise instantiate the data class.
  if (!$o) {
    $o = Frx::Data();
  }
  return $o;
}