3 namespace Drupal\libraries\ExternalLibrary\Remote;
5 use Drupal\libraries\ExternalLibrary\LibraryInterface;
8 * Provides an interface for remote libraries.
10 * Assuming they declare a remote URL, remote libraries are always loaded. It is
11 * not checked whether or not the Drupal site has network access or the remote
12 * resource is available.
14 interface RemoteLibraryInterface extends LibraryInterface {
17 * Checks whether the library has a remote URL.
19 * This check allows using the same library class for multiple libraries only
20 * some of which are available remotely.
23 * TRUE if the library has a remote URL; FALSE otherwise.
25 * @see \Drupal\libraries\ExternalLibrary\Asset\AssetLibraryInterface
27 public function hasRemoteUrl();
30 * Returns the remote URL of the library.
33 * The remote URL of the library.
35 * @todo Consider throwing an exception if hasRemoteUrl() return FALSE.
37 public function getRemoteUrl();