If the event is applicable for a transition then that transition from the
current state will be applied.
If there are multiple transitions possible for the event, the transitions
will be tried until one of them is possible.
This type of (event/trigger) handling is found in mealy machines.
public handle ( string $event, string $message = null ) : boolean | ||
$event | string | in case the transition will be triggered by an event code
(mealy machine)
this will also match on the transition name
( |
$message | string | optional message. this can be used by the persistence adapter to be part of the transition history to provide extra information about the transition. |
return | boolean | true in case a transition was triggered by the event, false otherwise |