3 namespace Drupal\libraries\ExternalLibrary;
5 use Drupal\libraries\ExternalLibrary\Type\LibraryTypeInterface;
8 * Provides an interface for different types of external libraries.
12 interface LibraryInterface {
15 * Creates an instance of the library from its definition.
19 * @param array $definition
20 * The library definition array.
21 * @param \Drupal\libraries\ExternalLibrary\Type\LibraryTypeInterface $type
22 * The library type of this library.
26 public static function create($id, array $definition, LibraryTypeInterface $type);
29 * Returns the ID of the library.
32 * The library ID. This must be unique among all known libraries.
34 public function getId();
37 * Returns the library type of the library.
39 * @return \Drupal\libraries\ExternalLibrary\Type\LibraryTypeInterface
40 * The library of the library.
42 public function getType();