You are here

class Context in Forena Reports 8

Same name and namespace in other branches
  1. 7.5 src/Context/Context.php \Drupal\forena\Context\Context

Hierarchy

  • class \Drupal\forena\Context\Context

Expanded class hierarchy of Context

File

src/Context/Context.php, line 10

Namespace

Drupal\forena\Context
View source
class Context {
  private $values;
  public function __construct() {
    $this->values = array();
  }
  public function getValue($key) {
    $value = @$this->values[$key];
    return $value;
  }
  public function setValue($key, $value) {
    $this->values[$key] = $value;
  }

  /**
   * @param string $name
   *   Paramater to get.
   * Create getter and setter so that you can act as objects.
   */
  public function __get($name) {
    $this
      ->getValue($name);
  }

  /**
   * @param $name
   * @param $value
   * General getter and setter for key value pairs
   */
  public function __set($name, $value) {
    $this
      ->setValue($name, $value);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Context::$values private property
Context::getValue public function
Context::setValue public function
Context::__construct public function
Context::__get public function
Context::__set public function