public function dispatchTransitionEvents(
        MachineInterface $machine,
        $object,
        StateLineStack $stateLineStack,
        Transition $transition
    ) {
        $this
            ->eventDispatcher
            ->dispatch(
                ElcodiStateTransitionMachineEvents::ALL_TRANSITIONS,
                TransitionEvent::create(
                    $object,
                    $stateLineStack,
                    $transition
                )
            );

        $this
            ->eventDispatcher
            ->dispatch(
                str_replace(
                    [
                        '{machine_id}',
                        '{state_name}',
                    ],
                    [
                        $machine->getId(),
                        $transition->getStart()->getName(),
                    ],
                    ElcodiStateTransitionMachineEvents::TRANSITION_FROM_STATE
                ),
                TransitionEvent::create(
                    $object,
                    $stateLineStack,
                    $transition
                )
            );

        $this
            ->eventDispatcher
            ->dispatch(
                str_replace(
                    [
                        '{machine_id}',
                        '{state_name}',
                    ],
                    [
                        $machine->getId(),
                        $transition->getFinal()->getName(),
                    ],
                    ElcodiStateTransitionMachineEvents::TRANSITION_TO_STATE
                ),
                TransitionEvent::create(
                    $object,
                    $stateLineStack,
                    $transition
                )
            );

        $this
            ->eventDispatcher
            ->dispatch(
                str_replace(
                    [
                        '{machine_id}',
                        '{transition_name}',
                    ],
                    [
                        $machine->getId(),
                        $transition->getName(),
                    ],
                    ElcodiStateTransitionMachineEvents::TRANSITION
                ),
                TransitionEvent::create(
                    $object,
                    $stateLineStack,
                    $transition
                )
            );
    }
public function dispatchTransitionEvents(
        MachineInterface $machine,
        $object,
        StateLineStack $stateLineStack,
        Transition $transition
    ) {
        $this
            ->eventDispatcher
            ->dispatch(
                ElcodiStateTransitionMachineEvents::ALL_TRANSITIONS,
                TransitionEvent::create(
                    $object,
                    $stateLineStack,
                    $transition
                )
            );

        $this
            ->eventDispatcher
            ->dispatch(
                str_replace(
                    [
                        '{machine_id}',
                        '{state_name}',
                    ],
                    [
                        $machine->getId(),
                        $transition->getStart()->getName(),
                    ],
                    ElcodiStateTransitionMachineEvents::TRANSITION_FROM_STATE
                ),
                TransitionEvent::create(
                    $object,
                    $stateLineStack,
                    $transition
                )
            );

        $this
            ->eventDispatcher
            ->dispatch(
                str_replace(
                    [
                        '{machine_id}',
                        '{state_name}',
                    ],
                    [
                        $machine->getId(),
                        $transition->getFinal()->getName(),
                    ],
                    ElcodiStateTransitionMachineEvents::TRANSITION_TO_STATE
                ),
                TransitionEvent::create(
                    $object,
                    $stateLineStack,
                    $transition
                )
            );

        $this
            ->eventDispatcher
            ->dispatch(
                str_replace(
                    [
                        '{machine_id}',
                        '{transition_name}',
                    ],
                    [
                        $machine->getId(),
                        $transition->getName(),
                    ],
                    ElcodiStateTransitionMachineEvents::TRANSITION
                ),
                TransitionEvent::create(
                    $object,
                    $stateLineStack,
                    $transition
                )
            );
    }
public function dispatchTransitionEvents ( MachineInterface $ machine , $ object , StateLineStack $ stateLineStack , Transition $ transition ) { $ this -> eventDispatcher -> dispatch ( ElcodiStateTransitionMachineEvents :: ALL_TRANSITIONS , TransitionEvent :: create ( $ object , $ stateLineStack , $ transition ) ) ; $ this -> eventDispatcher -> dispatch ( str_replace ( [ '{machine_id}' , '{state_name}' , ] , [ $ machine -> getId ( ) , $ transition -> getStart ( ) -> getName ( ) , ] , ElcodiStateTransitionMachineEvents :: TRANSITION_FROM_STATE ) , TransitionEvent :: create ( $ object , $ stateLineStack , $ transition ) ) ; $ this -> eventDispatcher -> dispatch ( str_replace ( [ '{machine_id}' , '{state_name}' , ] , [ $ machine -> getId ( ) , $ transition -> getFinal ( ) -> getName ( ) , ] , ElcodiStateTransitionMachineEvents :: TRANSITION_TO_STATE ) , TransitionEvent :: create ( $ object , $ stateLineStack , $ transition ) ) ; $ this -> eventDispatcher -> dispatch ( str_replace ( [ '{machine_id}' , '{transition_name}' , ] , [ $ machine -> getId ( ) , $ transition -> getName ( ) , ] , ElcodiStateTransitionMachineEvents :: TRANSITION ) , TransitionEvent :: create ( $ object , $ stateLineStack , $ transition ) ) ; }
Throw transition events.

@param MachineInterface $machine        Machine
@param mixed            $object         Object
@param StateLineStack   $stateLineStack StateLine Stack
@param Transition       $transition     Transition

@return $this Self object
Throw transition events .