function UrlResolverInterface::getProviderByUrl

Same name in other branches
  1. 9 core/modules/media/src/OEmbed/UrlResolverInterface.php \Drupal\media\OEmbed\UrlResolverInterface::getProviderByUrl()
  2. 8.9.x core/modules/media/src/OEmbed/UrlResolverInterface.php \Drupal\media\OEmbed\UrlResolverInterface::getProviderByUrl()
  3. 11.x core/modules/media/src/OEmbed/UrlResolverInterface.php \Drupal\media\OEmbed\UrlResolverInterface::getProviderByUrl()

Tries to determine the oEmbed provider for a media asset URL.

Parameters

string $url: The media asset URL.

Return value

\Drupal\media\OEmbed\Provider The oEmbed provider for the asset.

Throws

\Drupal\media\OEmbed\ResourceException If the provider cannot be determined.

\Drupal\media\OEmbed\ProviderException If tne oEmbed provider causes an error.

File

core/modules/media/src/OEmbed/UrlResolverInterface.php, line 28

Class

UrlResolverInterface
Defines the interface for the oEmbed URL resolver service.

Namespace

Drupal\media\OEmbed

Code

public function getProviderByUrl($url);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.