4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\DependencyInjection\Compiler;
15 * Represents an edge in your service graph.
17 * Value is typically a reference.
19 * @author Johannes M. Schmitt <schmittjoh@gmail.com>
21 class ServiceReferenceGraphEdge
30 * @param ServiceReferenceGraphNode $sourceNode
31 * @param ServiceReferenceGraphNode $destNode
36 public function __construct(ServiceReferenceGraphNode $sourceNode, ServiceReferenceGraphNode $destNode, $value = null, $lazy = false, $weak = false)
38 $this->sourceNode = $sourceNode;
39 $this->destNode = $destNode;
40 $this->value = $value;
46 * Returns the value of the edge.
50 public function getValue()
56 * Returns the source node.
58 * @return ServiceReferenceGraphNode
60 public function getSourceNode()
62 return $this->sourceNode;
66 * Returns the destination node.
68 * @return ServiceReferenceGraphNode
70 public function getDestNode()
72 return $this->destNode;
76 * Returns true if the edge is lazy, meaning it's a dependency not requiring direct instantiation.
80 public function isLazy()
86 * Returns true if the edge is weak, meaning it shouldn't prevent removing the target service.
90 public function isWeak()