You are here

public function VariableRealmDefaultController::variable_get in Variable 7

Get single variable.

Parameters

$name: Variable name

$default: Default value

Overrides VariableRealmControllerInterface::variable_get

File

variable_realm/variable_realm.class.inc, line 100
Variable realm controller

Class

VariableRealmDefaultController
Base class, keeps static list of variables.

Code

public function variable_get($name, $default = NULL) {
  $this
    ->variable_init();
  return isset($this->variables[$name]) ? $this->variables[$name] : $default;
}