\phpDocumentor\Transformer\Writer\GraphGraphVizClassDiagram

Summary

Methods
Properties
Constants
create()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
checkIfGraphVizIsInstalled()
createEdge()
createNamespaceGraph()
createEmptyNode()
buildNamespaceTree()
createGraphForNamespace()
$nodeCache
$namespaceCache
N/A

Properties

$nodeCache

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

Type

Node> — a cache where nodes for classes, interfaces and traits are stored for reference

$namespaceCache

$namespaceCache : \phpDocumentor\GraphViz\Graph[]

Type

Graph[]

Methods

create()

create(\phpDocumentor\Descriptor\ProjectDescriptor  $project, string  $filename) : void

Creates a class inheritance diagram.

Parameters

\phpDocumentor\Descriptor\ProjectDescriptor $project
string $filename

checkIfGraphVizIsInstalled()

checkIfGraphVizIsInstalled() : void

Checks whether GraphViz is installed and throws an Exception otherwise.

Throws

\RuntimeException

If graphviz is not found.

createEdge()

createEdge(string  $fromName, string|\phpDocumentor\Descriptor\ClassDescriptor|\phpDocumentor\Descriptor\InterfaceDescriptor|\phpDocumentor\Descriptor\TraitDescriptor  $to) : ?\phpDocumentor\GraphViz\Edge

Creates a GraphViz Edge between two nodes.

Parameters

string $fromName
string|\phpDocumentor\Descriptor\ClassDescriptor|\phpDocumentor\Descriptor\InterfaceDescriptor|\phpDocumentor\Descriptor\TraitDescriptor $to

Returns

?\phpDocumentor\GraphViz\Edge —

createNamespaceGraph()

createNamespaceGraph(string  $fqcn) : ?\phpDocumentor\GraphViz\Graph

Parameters

string $fqcn

Returns

?\phpDocumentor\GraphViz\Graph —

createEmptyNode()

createEmptyNode(string  $name, ?\phpDocumentor\GraphViz\Graph  $graph) : ?\phpDocumentor\GraphViz\Node

Parameters

string $name
?\phpDocumentor\GraphViz\Graph $graph

Returns

?\phpDocumentor\GraphViz\Node —

buildNamespaceTree()

buildNamespaceTree(\phpDocumentor\GraphViz\Graph  $graph, \phpDocumentor\Descriptor\Interfaces\NamespaceInterface  $namespace) : void

Builds a tree of namespace subgraphs with their classes associated.

Parameters

\phpDocumentor\GraphViz\Graph $graph
\phpDocumentor\Descriptor\Interfaces\NamespaceInterface $namespace

createGraphForNamespace()

createGraphForNamespace(string  $fullNamespaceName, string  $label) : \phpDocumentor\GraphViz\Graph

Parameters

string $fullNamespaceName
string $label

Returns

\phpDocumentor\GraphViz\Graph —