PHP code example of potfur / statemachine_renderer

1. Go to this page and download the library: Download potfur/statemachine_renderer library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

potfur / statemachine_renderer example snippets


$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');