annotate core/modules/media/src/OEmbed/ProviderRepositoryInterface.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 129ea1e6d783
children
rev   line source
Chris@17 1 <?php
Chris@17 2
Chris@17 3 namespace Drupal\media\OEmbed;
Chris@17 4
Chris@17 5 /**
Chris@17 6 * Defines an interface for a collection of oEmbed provider information.
Chris@17 7 *
Chris@17 8 * The provider repository is responsible for fetching information about all
Chris@17 9 * available oEmbed providers, most likely pulled from the online database at
Chris@17 10 * https://oembed.com/providers.json, and creating \Drupal\media\OEmbed\Provider
Chris@17 11 * value objects for each provider.
Chris@17 12 */
Chris@17 13 interface ProviderRepositoryInterface {
Chris@17 14
Chris@17 15 /**
Chris@17 16 * Returns information on all available oEmbed providers.
Chris@17 17 *
Chris@17 18 * @return \Drupal\media\OEmbed\Provider[]
Chris@17 19 * Returns an array of provider value objects, keyed by provider name.
Chris@17 20 *
Chris@17 21 * @throws \Drupal\media\OEmbed\ProviderException
Chris@17 22 * If the oEmbed provider information cannot be retrieved.
Chris@17 23 */
Chris@17 24 public function getAll();
Chris@17 25
Chris@17 26 /**
Chris@17 27 * Returns information for a specific oEmbed provider.
Chris@17 28 *
Chris@17 29 * @param string $provider_name
Chris@17 30 * The name of the provider.
Chris@17 31 *
Chris@17 32 * @return \Drupal\media\OEmbed\Provider
Chris@17 33 * A value object containing information about the provider.
Chris@17 34 *
Chris@17 35 * @throws \InvalidArgumentException
Chris@17 36 * If there is no known oEmbed provider with the specified name.
Chris@17 37 */
Chris@17 38 public function get($provider_name);
Chris@17 39
Chris@17 40 }