phpDocumentor

Graph extends WriterAbstract implements WithCustomSettings uses IoTrait

FinalYes

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' (default), a Class Diagram generated using GraphViz

Table of Contents

Interfaces

WithCustomSettings
Declares that the service implementing this interface yields its own settings.

Properties

$plantumlClassDiagram  : Generator

Methods

__construct()  : mixed
__toString()  : string
checkRequirements()  : void
This method verifies whether PHP has all requirements needed to run this writer.
getDefaultSettings()  : array<string, bool>
getName()  : string
Name of this writer, used to identify this writer.
transform()  : void
Generates a UML class diagram using PlantUML or our native GraphViz integration.
copy()  : void
persistTo()  : void
readSourceFile()  : string
copyDirectory()  : void
getDestinationPath()  : string
isGlobalTemplateReference()  : bool
normalizeDestination()  : string
normalizeSourcePath()  : string
stripFirstPartOfPath()  : string

Properties

Methods

__construct()

public __construct(Generator $plantumlClassDiagram) : mixed
Parameters
$plantumlClassDiagram : Generator

checkRequirements()

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

public checkRequirements() : void

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.

Tags
throws
RequirementMissing

When a requirements is missing stating which one.

codeCoverageIgnore

getDefaultSettings()

public getDefaultSettings() : array<string, bool>
Return values
array<string, bool>

getName()

Name of this writer, used to identify this writer.

public getName() : string

This name is also used in Collection as key and should match the name provided in the template definitions' transformations.

Return values
string

copy()

protected copy(Transformation $transformation, string $path, string $destination) : void
Parameters
$transformation : Transformation
$path : string
$destination : string

persistTo()

protected persistTo(Transformation $transformation, string $path, string $contents) : void
Parameters
$transformation : Transformation
$path : string
$contents : string

readSourceFile()

protected readSourceFile(Transformation $transformation, string $path) : string
Parameters
$transformation : Transformation
$path : string
Return values
string

copyDirectory()

private copyDirectory(Transformation $transformation, string $path, string $destination) : void
Parameters
$transformation : Transformation
$path : string
$destination : string

isGlobalTemplateReference()

private isGlobalTemplateReference(string $path) : bool
Parameters
$path : string
Return values
bool

normalizeDestination()

private normalizeDestination(string $destination) : string
Parameters
$destination : string
Return values
string

normalizeSourcePath()

private normalizeSourcePath(string $path) : string
Parameters
$path : string
Return values
string

stripFirstPartOfPath()

private stripFirstPartOfPath(string $path) : string
Parameters
$path : string
Return values
string

        
On this page

Search results