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