3 namespace Drupal\media\OEmbed;
6 * Defines an interface for a collection of oEmbed provider information.
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.
13 interface ProviderRepositoryInterface {
16 * Returns information on all available oEmbed providers.
18 * @return \Drupal\media\OEmbed\Provider[]
19 * Returns an array of provider value objects, keyed by provider name.
21 * @throws \Drupal\media\OEmbed\ProviderException
22 * If the oEmbed provider information cannot be retrieved.
24 public function getAll();
27 * Returns information for a specific oEmbed provider.
29 * @param string $provider_name
30 * The name of the provider.
32 * @return \Drupal\media\OEmbed\Provider
33 * A value object containing information about the provider.
35 * @throws \InvalidArgumentException
36 * If there is no known oEmbed provider with the specified name.
38 public function get($provider_name);