<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
power-modules / dependency-graph-mermaid example snippets
use Modular\Framework\App\ModularAppBuilder;
use Modular\DependencyGraph\PowerModule\Setup\DependencyGraphSetup;
use Modular\DependencyGraph\Graph\DependencyGraph;
use Modular\DependencyGraph\Renderer\RendererPluginRegistry;
use Modular\DependencyGraph\Renderer\Mermaid\MermaidRendererModule;
use Modular\Plugin\PowerModule\Setup\PluginRegistrySetup; // from power-modules/plugin
$app = (new ModularAppBuilder(__DIR__))
->withModules(
// your app modules ...
// any registered renderer on demand
$renderer = $registry->makePlugin(\Modular\DependencyGraph\Renderer\Mermaid\MermaidClassDiagram::class);
$mermaid = $renderer->render($graph);
file_put_contents(__DIR__ . '/../dependency-graph.mmd', $mermaid);
new MermaidGraph(
showExports: true,
showServices: true,
maxServiceLength: 50,
)
new MermaidClassDiagram(
showExports: true,
showServices: true,
maxServiceLength: 50,
)
new MermaidTimeline(
title: 'Module initialization timeline',
showCounts: true,
)
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.