potfur/statemachine_renderer

State machine renderer

1.0.0 2016-07-18 18:43 UTC

This package is not auto-updated.

Last update: 2024-12-13 23:10:12 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.