Updated to Drupal 8.6.4, which is PHP 7.3 friendly. Also updated HTMLaw library....
[yaffs-website] / web / core / modules / media / src / OEmbed / ProviderRepositoryInterface.php
1 <?php
2
3 namespace Drupal\media\OEmbed;
4
5 /**
6  * Defines an interface for a collection of oEmbed provider information.
7  *
8  * The provider repository is responsible for fetching information about all
9  * available oEmbed providers, most likely pulled from the online database at
10  * https://oembed.com/providers.json, and creating \Drupal\media\OEmbed\Provider
11  * value objects for each provider.
12  */
13 interface ProviderRepositoryInterface {
14
15   /**
16    * Returns information on all available oEmbed providers.
17    *
18    * @return \Drupal\media\OEmbed\Provider[]
19    *   Returns an array of provider value objects, keyed by provider name.
20    *
21    * @throws \Drupal\media\OEmbed\ProviderException
22    *   If the oEmbed provider information cannot be retrieved.
23    */
24   public function getAll();
25
26   /**
27    * Returns information for a specific oEmbed provider.
28    *
29    * @param string $provider_name
30    *   The name of the provider.
31    *
32    * @return \Drupal\media\OEmbed\Provider
33    *   A value object containing information about the provider.
34    *
35    * @throws \InvalidArgumentException
36    *   If there is no known oEmbed provider with the specified name.
37    */
38   public function get($provider_name);
39
40 }