function 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
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);