comparison vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents 4c8ae668cc8c
children 129ea1e6d783
comparison
equal deleted inserted replaced
13:5fb285c0d0e3 14:1fec387a4317
21 class ServiceReferenceGraphEdge 21 class ServiceReferenceGraphEdge
22 { 22 {
23 private $sourceNode; 23 private $sourceNode;
24 private $destNode; 24 private $destNode;
25 private $value; 25 private $value;
26 private $lazy;
27 private $weak;
26 28
27 /** 29 /**
28 * @param ServiceReferenceGraphNode $sourceNode 30 * @param ServiceReferenceGraphNode $sourceNode
29 * @param ServiceReferenceGraphNode $destNode 31 * @param ServiceReferenceGraphNode $destNode
30 * @param string $value 32 * @param mixed $value
33 * @param bool $lazy
34 * @param bool $weak
31 */ 35 */
32 public function __construct(ServiceReferenceGraphNode $sourceNode, ServiceReferenceGraphNode $destNode, $value = null) 36 public function __construct(ServiceReferenceGraphNode $sourceNode, ServiceReferenceGraphNode $destNode, $value = null, $lazy = false, $weak = false)
33 { 37 {
34 $this->sourceNode = $sourceNode; 38 $this->sourceNode = $sourceNode;
35 $this->destNode = $destNode; 39 $this->destNode = $destNode;
36 $this->value = $value; 40 $this->value = $value;
41 $this->lazy = $lazy;
42 $this->weak = $weak;
37 } 43 }
38 44
39 /** 45 /**
40 * Returns the value of the edge. 46 * Returns the value of the edge.
41 * 47 *
63 */ 69 */
64 public function getDestNode() 70 public function getDestNode()
65 { 71 {
66 return $this->destNode; 72 return $this->destNode;
67 } 73 }
74
75 /**
76 * Returns true if the edge is lazy, meaning it's a dependency not requiring direct instantiation.
77 *
78 * @return bool
79 */
80 public function isLazy()
81 {
82 return $this->lazy;
83 }
84
85 /**
86 * Returns true if the edge is weak, meaning it shouldn't prevent removing the target service.
87 *
88 * @return bool
89 */
90 public function isWeak()
91 {
92 return $this->weak;
93 }
68 } 94 }