Class representing an edge (arrow, line).

author Mike van Riel
copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
license MIT
link http://phpdoc.org

 Methods

Magic method to provide a getter/setter to add attributes on the edge.

__call(string $name, \mixed[] $arguments) : \phpDocumentor\GraphViz\Attribute[] | \phpDocumentor\GraphViz\Edge | null

Using this method we make sure that we support any attribute without too much hassle. If the name for this method does not start with get or set we return null. Set methods return this graph (fluent interface) whilst get methods return the attribute value.

Parameters

$name

string

name of the invoked method, expect it to be setX or getX.

$arguments

\mixed[]

Arguments for the setter, only 1 is expected: value

Returns

Creates a new Edge / Link between the given nodes.

__construct(Node $from, Node $to) 

Parameters

$from

\phpDocumentor\GraphViz\Node

Starting node to create an Edge from.

$to

\phpDocumentor\GraphViz\Node

Destination node where to create and edge to.

Returns the edge definition as is requested by GraphViz.

__toString() : string

Returns

string

Factory method used to assist with fluent interface handling.

create(Node $from, Node $to) : \phpDocumentor\GraphViz\Edge

See the examples for more details.

Parameters

$from

\phpDocumentor\GraphViz\Node

Starting node to create an Edge from.

$to

\phpDocumentor\GraphViz\Node

Destination node where to create and edge to.

Returns

Returns the source Node for this Edge.

getFrom() : \phpDocumentor\GraphViz\Node

Returns the destination Node for this Edge.

getTo() : \phpDocumentor\GraphViz\Node

 Properties

 

<p>List of attributes for this edge</p>

$attributes : \phpDocumentor\GraphViz\Attribute

 

<p>Node from where to link</p>

$from : \phpDocumentor\GraphViz\Node

 

<p>Node where to to link</p>

$to : \phpDocumentor\GraphViz\Node