Fuente: https://github.com/chamilo/chamilo-lms/releases/download/v1.11.40/chamilo-1.11.40.zip sha256: 1cf4bf2cc7bae1ef1a1eff643235db1d552f78ddf4b6dd1e2d2dac9868679439 Snapshot independiente (rama huerfana); diffable vs 1.11.38. vendor incluido.
21 lines
559 B
PHP
21 lines
559 B
PHP
<?php
|
|
|
|
use Graphp\GraphViz\GraphViz;
|
|
|
|
require __DIR__ . '/../vendor/autoload.php';
|
|
|
|
$graph = new Fhaculty\Graph\Graph();
|
|
|
|
$a = $graph->createVertex('Entity');
|
|
$a->setAttribute('graphviz.shape', 'record');
|
|
$a->setAttribute('graphviz.label', GraphViz::raw('"{\N||+ touch()}"'));
|
|
|
|
$b = $graph->createVertex('Block');
|
|
$b->createEdgeTo($a);
|
|
$b->setAttribute('graphviz.shape', 'record');
|
|
$b->setAttribute('graphviz.label', GraphViz::raw('"{\N|- size:int|+ touch()}"'));
|
|
|
|
$graphviz = new GraphViz();
|
|
echo $graphviz->createScript($graph);
|
|
$graphviz->display($graph);
|