Files
Chamilo/vendor/graphp/graphviz/src/Dot.php
2025-08-14 22:41:49 +02:00

27 lines
510 B
PHP

<?php
namespace Graphp\GraphViz;
use Graphp\GraphViz\GraphViz;
use Fhaculty\Graph\Graph;
use Fhaculty\Graph\Exporter\ExporterInterface;
class Dot implements ExporterInterface
{
private $graphviz;
public function __construct(GraphViz $graphviz = null)
{
if ($graphviz === null) {
$graphviz = new GraphViz();
}
$this->graphviz = $graphviz;
}
public function getOutput(Graph $graph)
{
return $this->graphviz->createScript($graph);
}
}