vendor/symfony/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphEdge.php
changeset 0 7f95f8617b0b
equal deleted inserted replaced
-1:000000000000 0:7f95f8617b0b
       
     1 <?php
       
     2 
       
     3 /*
       
     4  * This file is part of the Symfony package.
       
     5  *
       
     6  * (c) Fabien Potencier <fabien@symfony.com>
       
     7  *
       
     8  * For the full copyright and license information, please view the LICENSE
       
     9  * file that was distributed with this source code.
       
    10  */
       
    11 
       
    12 namespace Symfony\Component\DependencyInjection\Compiler;
       
    13 
       
    14 /**
       
    15  * Represents an edge in your service graph.
       
    16  *
       
    17  * Value is typically a reference.
       
    18  *
       
    19  * @author Johannes M. Schmitt <schmittjoh@gmail.com>
       
    20  */
       
    21 class ServiceReferenceGraphEdge
       
    22 {
       
    23     private $sourceNode;
       
    24     private $destNode;
       
    25     private $value;
       
    26 
       
    27     /**
       
    28      * Constructor.
       
    29      *
       
    30      * @param ServiceReferenceGraphNode $sourceNode
       
    31      * @param ServiceReferenceGraphNode $destNode
       
    32      * @param string $value
       
    33      */
       
    34     public function __construct(ServiceReferenceGraphNode $sourceNode, ServiceReferenceGraphNode $destNode, $value = null)
       
    35     {
       
    36         $this->sourceNode = $sourceNode;
       
    37         $this->destNode = $destNode;
       
    38         $this->value = $value;
       
    39     }
       
    40 
       
    41     /**
       
    42      * Returns the value of the edge
       
    43      *
       
    44      * @return ServiceReferenceGraphNode
       
    45      */
       
    46     public function getValue()
       
    47     {
       
    48         return $this->value;
       
    49     }
       
    50 
       
    51     /**
       
    52      * Returns the source node
       
    53      *
       
    54      * @return ServiceReferenceGraphNode
       
    55      */
       
    56     public function getSourceNode()
       
    57     {
       
    58         return $this->sourceNode;
       
    59     }
       
    60 
       
    61     /**
       
    62      * Returns the destination node
       
    63      *
       
    64      * @return ServiceReferenceGraphNode
       
    65      */
       
    66     public function getDestNode()
       
    67     {
       
    68         return $this->destNode;
       
    69     }
       
    70 }