This package is deprecated!
Do not use it!
EXTendable State Machine
Stage flow see here: http://extas.jeyroik.ru (RU lang)
composer require jeyroik/extas-m:*
- define generic plugins
- define all other plugins
- define machine config
- define dispatchers for your states (or you can use built-in dispatchers for test aims)
- run machine
$config = [...]; // or dsn if you have db generic plugins
$extas = new jeyroik\extas\components\systmes\states\StateMachine($config);
$extas->run();
If you are using State route plugin (by default), you can see states route:
echo '<pre>';
print_r($extas->getRoute());
echo '</pre>';
Extas let you extend it by two dimensions:
- functionality
- stages triggering
Stages - they are like events, you can react on stage when it is reached.
Functionality - this is built-in opportunity for extending exactly objects interface without needs to extends them physically by class extending. This is reached by extensions.
- create you plugin
- require it to you project
- create extension
- require it to your project