GraphVizClassDiagram

in package
Implements Generator

Interfaces, Classes & Used Traits

Generator

Properties

private$nodeCache  : array<string,?\phpDocumentor\GraphViz\Node>                

private$namespaceCache  : \phpDocumentor\GraphViz\Graph[]                

Methods

Creates a class inheritance diagram.

publiccreate(ProjectDescriptor $project, string $filename) : void

Parameters

$project : ProjectDescriptor
$filename : string

Builds a tree of namespace subgraphs with their classes associated.

protectedbuildNamespaceTree(Graph $graph, NamespaceInterface $namespace) : void

Parameters

$graph : Graph
$namespace : NamespaceInterface

Checks whether GraphViz is installed and throws an Exception otherwise.

privatecheckIfGraphVizIsInstalled() : void

Throws

\RuntimeException

If graphviz is not found.

Creates a GraphViz Edge between two nodes.

privatecreateEdge(string $fromName, string|ClassDescriptor|InterfaceDescriptor|TraitDescriptor $to) : Edge|null

Parameters

$fromName : string
$to : string|ClassDescriptor|InterfaceDescriptor|TraitDescriptor

Returns

Edge|null

privatecreateNamespaceGraph(string $fqcn) : Graph|null

Parameters

$fqcn : string

Returns

Graph|null

privatecreateEmptyNode(string $name, Graph|null $graph) : Node|null

Parameters

$name : string
$graph : Graph|null

Returns

Node|null

privatecreateGraphForNamespace(string $fullNamespaceName, string $label) : Graph

Parameters

$fullNamespaceName : string
$label : string

Returns

Graph