potfur / statemachine_renderer
State machine renderer
1.0.0
2016-07-18 18:43 UTC
Requires
- php: >=7.0
- potfur/statemachine: ^2.0
Requires (Dev)
- phpunit/phpunit: ^5.4
This package is not auto-updated.
Last update: 2024-11-01 22:41:43 UTC
README
For ease of designing StateMachine processes, Renderer
present any processes as graphs in PNG
or SVG
files.
$process = (new ArrayAdapter($schema))->getProcess(); $document = Document::fromProcess($process); $renderer = new Renderer('/usr/bin/dot'); $pathToPng = $renderer->png($document, 'dot.png'); $pathToSvg = $renderer->svg($document, 'dot.svg');
Renderer
requires Graphviz to draw graphs.