Further modules included.
[yaffs-website] / web / modules / contrib / libraries / src / ExternalLibrary / Version / VersionDetectorInterface.php
diff --git a/web/modules/contrib/libraries/src/ExternalLibrary/Version/VersionDetectorInterface.php b/web/modules/contrib/libraries/src/ExternalLibrary/Version/VersionDetectorInterface.php
new file mode 100644 (file)
index 0000000..8b6d2a5
--- /dev/null
@@ -0,0 +1,25 @@
+<?php
+
+namespace Drupal\libraries\ExternalLibrary\Version;
+
+/**
+ * Provides an interface for version detectors.
+ *
+ * @ingroup libraries
+ */
+interface VersionDetectorInterface {
+
+  /**
+   * Detects the version of a library.
+   *
+   * @param \Drupal\libraries\ExternalLibrary\Version\VersionedLibraryInterface $library
+   *   The library whose version to detect.
+   *
+   * @throws \Drupal\libraries\ExternalLibrary\Exception\UnknownLibraryVersionException
+   *
+   * @todo Provide a mechanism for version detectors to provide a reason for
+   *   failing.
+   */
+  public function detectVersion(VersionedLibraryInterface $library);
+
+}