interface ProviderRepositoryInterface (View source)

Defines an interface for a collection of oEmbed provider information.

The provider repository is responsible for fetching information about all available oEmbed providers, most likely pulled from the online database at https://oembed.com/providers.json, and creating \Drupal\media\OEmbed\Provider value objects for each provider.

Methods

getAll()

Returns information on all available oEmbed providers.

get(string $provider_name)

Returns information for a specific oEmbed provider.

Details

Provider[] getAll()

Returns information on all available oEmbed providers.

Return Value

Provider[]

Returns an array of provider value objects, keyed by provider name.

Exceptions

ProviderException

Provider get(string $provider_name)

Returns information for a specific oEmbed provider.

Parameters

string $provider_name

The name of the provider.

Return Value

Provider

A value object containing information about the provider.

Exceptions

InvalidArgumentException