function ResourceFetcherInterface::fetchResource
Same name in other branches
- 9 core/modules/media/src/OEmbed/ResourceFetcherInterface.php \Drupal\media\OEmbed\ResourceFetcherInterface::fetchResource()
- 10 core/modules/media/src/OEmbed/ResourceFetcherInterface.php \Drupal\media\OEmbed\ResourceFetcherInterface::fetchResource()
- 11.x core/modules/media/src/OEmbed/ResourceFetcherInterface.php \Drupal\media\OEmbed\ResourceFetcherInterface::fetchResource()
Fetches an oEmbed resource.
Parameters
string $url: Endpoint-specific URL of the oEmbed resource.
Return value
\Drupal\media\OEmbed\Resource A resource object built from the oEmbed resource data.
Throws
\Drupal\media\OEmbed\ResourceException If the oEmbed endpoint is not reachable or the response returns an unexpected Content-Type header.
See also
1 method overrides ResourceFetcherInterface::fetchResource()
- ResourceFetcher::fetchResource in core/
modules/ media/ src/ OEmbed/ ResourceFetcher.php - Fetches an oEmbed resource.
File
-
core/
modules/ media/ src/ OEmbed/ ResourceFetcherInterface.php, line 30
Class
- ResourceFetcherInterface
- Defines an interface for an oEmbed resource fetcher service.
Namespace
Drupal\media\OEmbedCode
public function fetchResource($url);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.