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).
Example
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).
Example
To get a better Finite DSL, you should look here https://gist.github.com/tortuetorche/6365575.
| <?php | |
| namespace CHH; | |
| trait MetaObject | |
| { | |
| protected static $__metaClass; | |
| static function setMetaClass(MetaClass $metaClass) | |
| { |