PHP code example of clue / graph-uml

1. Go to this page and download the library: Download clue/graph-uml 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/ */

    

clue / graph-uml example snippets


// initialize an empty graph and the UML class diagram builder
$graph = new Fhaculty\Graph\Graph();
$builder = new Fhaculty\Graph\Uml\ClassDiagramBuilder($graph);

// let's add some classes to the diagram
$builder->createVertexClass('Fhaculty\Graph\Uml\ClassDiagramBuilder');

// display graph as svg image
$graphviz = new Fhaculty\Graph\GraphViz($graph);
$graphviz->display();