Further modules included.
[yaffs-website] / web / modules / contrib / libraries / src / ExternalLibrary / Utility / IdAccessorTrait.php
diff --git a/web/modules/contrib/libraries/src/ExternalLibrary/Utility/IdAccessorTrait.php b/web/modules/contrib/libraries/src/ExternalLibrary/Utility/IdAccessorTrait.php
new file mode 100644 (file)
index 0000000..34476f2
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+
+namespace Drupal\libraries\ExternalLibrary\Utility;
+
+/**
+ * Provides a trait for classes that have a string identifier.
+ */
+trait IdAccessorTrait {
+
+  /**
+   * The ID.
+   *
+   * @var string
+   */
+  protected $id;
+
+  /**
+   * Returns the ID.
+   *
+   * @return string
+   *   The ID.
+   *
+   * @see \Drupal\libraries\ExternalLibrary\LibraryInterface::getId()
+   * @see \Drupal\libraries\ExternalLibrary\LibraryType\LibraryTypeInterface::getId()
+   */
+  public function getId() {
+    return $this->id;
+  }
+
+}