
| Current Path : /var/www/html/rocksensor3/web/core/modules/media/src/OEmbed/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/rocksensor3/web/core/modules/media/src/OEmbed/ResourceFetcherInterface.php |
<?php
namespace Drupal\media\OEmbed;
/**
* Defines an interface for an oEmbed resource fetcher service.
*
* The resource fetcher's only responsibility is to retrieve oEmbed resource
* data from an endpoint URL (i.e., as returned by
* \Drupal\media\OEmbed\UrlResolverInterface::getResourceUrl()) and return a
* \Drupal\media\OEmbed\Resource value object.
*/
interface ResourceFetcherInterface {
/**
* Fetches an oEmbed resource.
*
* @param string $url
* Endpoint-specific URL of the oEmbed resource.
*
* @return \Drupal\media\OEmbed\Resource
* A resource object built from the oEmbed resource data.
*
* @see https://oembed.com/#section2
*
* @throws \Drupal\media\OEmbed\ResourceException
* If the oEmbed endpoint is not reachable or the response returns an
* unexpected Content-Type header.
*/
public function fetchResource($url);
}