Further modules included.
[yaffs-website] / web / modules / contrib / libraries / src / ExternalLibrary / LibraryInterface.php
1 <?php
2
3 namespace Drupal\libraries\ExternalLibrary;
4
5 use Drupal\libraries\ExternalLibrary\Type\LibraryTypeInterface;
6
7 /**
8  * Provides an interface for different types of external libraries.
9  *
10  * @ingroup libraries
11  */
12 interface LibraryInterface {
13
14   /**
15    * Creates an instance of the library from its definition.
16    *
17    * @param string $id
18    *   The library ID.
19    * @param array $definition
20    *   The library definition array.
21    * @param \Drupal\libraries\ExternalLibrary\Type\LibraryTypeInterface $type
22    *   The library type of this library.
23    *
24    * @return static
25    */
26   public static function create($id, array $definition, LibraryTypeInterface $type);
27
28   /**
29    * Returns the ID of the library.
30    *
31    * @return string
32    *   The library ID. This must be unique among all known libraries.
33    */
34   public function getId();
35
36   /**
37    * Returns the library type of the library.
38    *
39    * @return \Drupal\libraries\ExternalLibrary\Type\LibraryTypeInterface
40    *   The library of the library.
41    */
42   public function getType();
43
44 }