You are here

public function StateMachine_Event::__construct in State Machine 7.2

Same name and namespace in other branches
  1. 6 inc/base.inc \StateMachine_Event::__construct()
  2. 7.3 inc/base.inc \StateMachine_Event::__construct()
  3. 7 inc/base.inc \StateMachine_Event::__construct()

File

inc/base.inc, line 275
base.inc

Class

StateMachine_Event

Code

public function __construct($key, $machine, $options = array()) {
  $this->key = $key;
  $this->machine = $machine;

  // Normalize the origin option.
  $origin = empty($options['origin']) ? array() : $options['origin'];
  $options['origin'] = is_array($origin) ? $origin : array(
    $origin,
  );
  $this->options = $options;
}