/** * Invoked after a state transition * @param AState $from The state we're transitioning from */ public function afterTransition(AState $fromState) { $fromState->afterExit(); $this->getState()->afterEnter($fromState); $transition = new AStateTransition($this); $transition->to = $this->getState(); $transition->from = $fromState; $this->onAfterTransition($transition); }