Further modules included.
[yaffs-website] / web / modules / contrib / libraries / src / ExternalLibrary / LibraryInterface.php
diff --git a/web/modules/contrib/libraries/src/ExternalLibrary/LibraryInterface.php b/web/modules/contrib/libraries/src/ExternalLibrary/LibraryInterface.php
new file mode 100644 (file)
index 0000000..ebf43a9
--- /dev/null
@@ -0,0 +1,44 @@
+<?php
+
+namespace Drupal\libraries\ExternalLibrary;
+
+use Drupal\libraries\ExternalLibrary\Type\LibraryTypeInterface;
+
+/**
+ * Provides an interface for different types of external libraries.
+ *
+ * @ingroup libraries
+ */
+interface LibraryInterface {
+
+  /**
+   * Creates an instance of the library from its definition.
+   *
+   * @param string $id
+   *   The library ID.
+   * @param array $definition
+   *   The library definition array.
+   * @param \Drupal\libraries\ExternalLibrary\Type\LibraryTypeInterface $type
+   *   The library type of this library.
+   *
+   * @return static
+   */
+  public static function create($id, array $definition, LibraryTypeInterface $type);
+
+  /**
+   * Returns the ID of the library.
+   *
+   * @return string
+   *   The library ID. This must be unique among all known libraries.
+   */
+  public function getId();
+
+  /**
+   * Returns the library type of the library.
+   *
+   * @return \Drupal\libraries\ExternalLibrary\Type\LibraryTypeInterface
+   *   The library of the library.
+   */
+  public function getType();
+
+}