Graph

Extends \phpDocumentor\Transformer\Writer\WriterAbstract

Writer responsible for generating various graphs.

The Graph writer is capable of generating a Graph (as provided using the 'source' parameter) at the location provided using the artifact parameter.

Currently supported:

  • 'class', a Class Diagram Generated using GraphViz
todo

Fix this class

package

Default

Methods

Builds a tree of namespace subgraphs with their classes associated.

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

Arguments

$graph

\phpDocumentor\GraphViz\Graph

Checks if there is a space in the path.

checkForSpacesInPath(string $path) : void
inherited
Throws
\InvalidArgumentException

if path contains a space.

Arguments

$path

string

Checks whether GraphViz is installed and throws an Exception otherwise.

checkIfGraphVizIsInstalled() : void
Throws
\Zend\Stdlib\Exception\ExtensionNotLoadedException

if graphviz is not found.

This method verifies whether PHP has all requirements needed to run this writer.

checkRequirements() : void
inherited

If one of the requirements is missing for this Writer then an exception of type RequirementMissing should be thrown; this indicates to the calling process that this writer will not function.

Throws
\phpDocumentor\Transformer\Writer\Exception\RequirementMissing

when a requirements is missing stating which one.

Creates a GraphViz Edge between two nodes.

createEdge(\phpDocumentor\Plugin\Graphs\Writer\Graph $graph, string $from_name, string|\phpDocumentor\Descriptor\ClassDescriptor|\phpDocumentor\Descriptor\InterfaceDescriptor|\phpDocumentor\Descriptor\TraitDescriptor $to) : \phpDocumentor\GraphViz\Edge

createEmptyNode

createEmptyNode(string $name, \phpDocumentor\Plugin\Graphs\Writer\Graph $graph) : \phpDocumentor\GraphViz\Node

Arguments

$name

string

Response

\phpDocumentor\GraphViz\Node

createGraphForNamespace

createGraphForNamespace( $full_namespace_name,  $label) : mixed

Arguments

$full_namespace_name

$label

Response

mixed

createNamespaceGraph

createNamespaceGraph( $fqcn) 

Arguments

$fqcn

getDestinationPath

getDestinationPath(\phpDocumentor\Transformer\Transformation $transformation) : string

Arguments

Response

string

Creates a class inheritance diagram.

processClass(\phpDocumentor\Descriptor\ProjectDescriptor $project, \phpDocumentor\Transformer\Transformation $transformation) : void

Abstract definition of the transformation method.

transform(\phpDocumentor\Descriptor\ProjectDescriptor $project, \phpDocumentor\Transformer\Transformation $transformation) : void
inherited abstract

Arguments

$project

\phpDocumentor\Descriptor\ProjectDescriptor

Document containing the structure.

$transformation

\phpDocumentor\Transformer\Transformation

Transformation to execute.

Properties

Name of the font to use to display the node labels with

nodeFont : string
var

Name of the font to use to display the node labels with

Type(s)

string

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

nodeCache : array<mixed,\phpDocumentor\GraphViz\Node>
var

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

Type(s)

array<mixed,\phpDocumentor\GraphViz\Node>

namespaceCache

namespaceCache : array<mixed,\phpDocumentor\GraphViz\Graph>
var

Type(s)

array<mixed,\phpDocumentor\GraphViz\Graph>