Drupal investigation

ServiceReferenceGraphEdge.php 1.4KB

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