You are here

public function RulesState::addVariable in Rules 7.2

Adds the given variable to the given execution state.

1 call to RulesState::addVariable()
RulesState::__construct in includes/rules.state.inc
Constructs a RulesState object.

File

includes/rules.state.inc, line 67
Contains the state and data related stuff.

Class

RulesState
The rules evaluation state.

Code

public function addVariable($name, $data, $info) {
  $this->info[$name] = $info + array(
    'skip save' => FALSE,
    'type' => 'unknown',
    'handler' => FALSE,
  );
  if (empty($this->info[$name]['handler'])) {
    $this->variables[$name] = rules_wrap_data($data, $this->info[$name]);
  }
}