diff 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
line wrap: on
line diff
--- a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php	Mon Apr 23 09:33:26 2018 +0100
+++ b/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php	Mon Apr 23 09:46:53 2018 +0100
@@ -23,17 +23,23 @@
     private $sourceNode;
     private $destNode;
     private $value;
+    private $lazy;
+    private $weak;
 
     /**
      * @param ServiceReferenceGraphNode $sourceNode
      * @param ServiceReferenceGraphNode $destNode
-     * @param string                    $value
+     * @param mixed                     $value
+     * @param bool                      $lazy
+     * @param bool                      $weak
      */
-    public function __construct(ServiceReferenceGraphNode $sourceNode, ServiceReferenceGraphNode $destNode, $value = null)
+    public function __construct(ServiceReferenceGraphNode $sourceNode, ServiceReferenceGraphNode $destNode, $value = null, $lazy = false, $weak = false)
     {
         $this->sourceNode = $sourceNode;
         $this->destNode = $destNode;
         $this->value = $value;
+        $this->lazy = $lazy;
+        $this->weak = $weak;
     }
 
     /**
@@ -65,4 +71,24 @@
     {
         return $this->destNode;
     }
+
+    /**
+     * Returns true if the edge is lazy, meaning it's a dependency not requiring direct instantiation.
+     *
+     * @return bool
+     */
+    public function isLazy()
+    {
+        return $this->lazy;
+    }
+
+    /**
+     * Returns true if the edge is weak, meaning it shouldn't prevent removing the target service.
+     *
+     * @return bool
+     */
+    public function isWeak()
+    {
+        return $this->weak;
+    }
 }