Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ResourceFetcherInterface.php

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

https://oembed.com/#section2

File

core/modules/media/src/OEmbed/ResourceFetcherInterface.php, line 30

Class

ResourceFetcherInterface
Defines an interface for an oEmbed resource fetcher service.

Namespace

Drupal\media\OEmbed

Code

public function fetchResource($url);
RSS feed
Powered by Drupal