Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / league / container / src / ImmutableContainerAwareTrait.php
diff --git a/vendor/league/container/src/ImmutableContainerAwareTrait.php b/vendor/league/container/src/ImmutableContainerAwareTrait.php
new file mode 100644 (file)
index 0000000..d2129bd
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+
+namespace League\Container;
+
+use Interop\Container\ContainerInterface as InteropContainerInterface;
+
+trait ImmutableContainerAwareTrait
+{
+    /**
+     * @var \Interop\Container\ContainerInterface
+     */
+    protected $container;
+
+    /**
+     * Set a container.
+     *
+     * @param  \Interop\Container\ContainerInterface $container
+     * @return $this
+     */
+    public function setContainer(InteropContainerInterface $container)
+    {
+        $this->container = $container;
+
+        return $this;
+    }
+
+    /**
+     * Get the container.
+     *
+     * @return \League\Container\ImmutableContainerInterface
+     */
+    public function getContainer()
+    {
+        return $this->container;
+    }
+}