Used to mark the initial construction of a statemachine at a certain
point in time. This method only makes sense the first time a statemachine
is initialized and used since it will do nothing once a transition has been made.
It will set the initial state on the backend which sets
the construction time.
Make sure that the transitions and states are loaded before you call this method.
in other words: the machine should be ready to go.
public add ( string $message = null ) : boolean | ||
$message | string | optional message. this can be used by the persistence adapter to provide extra information in the history of the machine transitions, in this case, about the first adding of this machine to the persistence layer. |
return | boolean | true if not persisted before, false otherwise |