public function __construct(State $state_from, State $state_to, $event = null, $rule = self::RULE_EMPTY, $command = self::COMMAND_EMPTY, $callable_guard = self::CALLABLE_NULL, $callable_transition = self::CALLABLE_NULL)
{
$this->state_from = $state_from;
$this->state_to = $state_to;
$this->setRuleName($rule);
$this->setCommandName($command);
$this->setGuardCallable($callable_guard);
$this->setTransitionCallable($callable_transition);
// setup bidirectional relationship with state this transition
// originates from. only if it's not a regex or final state type
if (!$state_from->isRegex() && !$state_from->isFinal()) {
$state_from->addTransition($this);
}
// set and sanitize event name
$this->setEvent($event);
}