for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* PHP version 7.1
*
* This source file is subject to the license that is bundled with this package in the file LICENSE.
*/
namespace PhUml\Graphviz;
class Edge implements HasDotRepresentation
{
/** @var HasNodeIdentifier */
private $fromNode;
private $toNode;
/** @var string */
private $options;
public static function inheritance(HasNodeIdentifier $parent, HasNodeIdentifier $child): Edge
return new Edge($parent, $child, 'dir=back arrowtail=empty style=solid');
}
public static function implementation(HasNodeIdentifier $interface, HasNodeIdentifier $class): Edge
return new Edge($interface, $class, 'dir=back arrowtail=normal style=dashed');
public static function association(HasNodeIdentifier $reference, HasNodeIdentifier $class): Edge
return new Edge($reference, $class, 'dir=back arrowtail=none style=dashed');
public function toDotLanguage(): string
return "\"{$this->fromNode->identifier()}\" -> \"{$this->toNode->identifier()}\" [{$this->options}]\n";
private function __construct(HasNodeIdentifier $nodeA, HasNodeIdentifier $nodeB, string $options)
$this->fromNode = $nodeA;
$this->toNode = $nodeB;
$this->options = $options;