Mercurial > hg > isophonics-drupal-site
comparison core/modules/media/src/OEmbed/ResourceFetcherInterface.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\media\OEmbed; | |
4 | |
5 /** | |
6 * Defines an interface for an oEmbed resource fetcher service. | |
7 * | |
8 * The resource fetcher's only responsibility is to retrieve oEmbed resource | |
9 * data from an endpoint URL (i.e., as returned by | |
10 * \Drupal\media\OEmbed\UrlResolverInterface::getResourceUrl()) and return a | |
11 * \Drupal\media\OEmbed\Resource value object. | |
12 */ | |
13 interface ResourceFetcherInterface { | |
14 | |
15 /** | |
16 * Fetches an oEmbed resource. | |
17 * | |
18 * @param string $url | |
19 * Endpoint-specific URL of the oEmbed resource. | |
20 * | |
21 * @return \Drupal\media\OEmbed\Resource | |
22 * A resource object built from the oEmbed resource data. | |
23 * | |
24 * @see https://oembed.com/#section2 | |
25 * | |
26 * @throws \Drupal\media\OEmbed\ResourceException | |
27 * If the oEmbed endpoint is not reachable or the response returns an | |
28 * unexpected Content-Type header. | |
29 */ | |
30 public function fetchResource($url); | |
31 | |
32 } |