Further modules included.
[yaffs-website] / web / modules / contrib / libraries / src / ExternalLibrary / Utility / DependencyAccessorTrait.php
diff --git a/web/modules/contrib/libraries/src/ExternalLibrary/Utility/DependencyAccessorTrait.php b/web/modules/contrib/libraries/src/ExternalLibrary/Utility/DependencyAccessorTrait.php
new file mode 100644 (file)
index 0000000..3ec56fe
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+
+namespace Drupal\libraries\ExternalLibrary\Utility;
+
+/**
+ * Provides a trait for classes giving access to a library dependency.
+ */
+trait DependencyAccessorTrait {
+
+  /**
+   * The dependency.
+   *
+   * @var \Drupal\libraries\ExternalLibrary\LibraryInterface
+   */
+  protected $dependency;
+
+  /**
+   * Returns the dependency.
+   *
+   * @return \Drupal\libraries\ExternalLibrary\LibraryInterface
+   *   The library.
+   */
+  public function getLibrary() {
+    return $this->dependency;
+  }
+
+}