Add a DSL to the PHP Finite package, borrowed from the Ruby StateMachine gem.
In your Stateful Class, add the stateMachineConfig()
method and call initStateMachine()
method at initialization (__contruct()
method).
Check MyStatefulClass.php and Usage.php.
My previous version of this DSL can be found here
MIT
Use At Your Own Risk