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

Breadcrumb

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

interface ProviderRepositoryInterface

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.

Hierarchy

  • interface \Drupal\media\OEmbed\ProviderRepositoryInterface

Expanded class hierarchy of ProviderRepositoryInterface

All classes that implement ProviderRepositoryInterface

File

core/modules/media/src/OEmbed/ProviderRepositoryInterface.php, line 13

Namespace

Drupal\media\OEmbed
View source
interface ProviderRepositoryInterface {
    
    /**
     * Returns information on all available oEmbed providers.
     *
     * @return \Drupal\media\OEmbed\Provider[]
     *   Returns an array of provider value objects, keyed by provider name.
     *
     * @throws \Drupal\media\OEmbed\ProviderException
     *   If the oEmbed provider information cannot be retrieved.
     */
    public function getAll();
    
    /**
     * Returns information for a specific oEmbed provider.
     *
     * @param string $provider_name
     *   The name of the provider.
     *
     * @return \Drupal\media\OEmbed\Provider
     *   A value object containing information about the provider.
     *
     * @throws \InvalidArgumentException
     *   If there is no known oEmbed provider with the specified name.
     */
    public function get($provider_name);

}

Members

Title Sort descending Modifiers Object type Summary
ProviderRepositoryInterface::get public function Returns information for a specific oEmbed provider.
ProviderRepositoryInterface::getAll public function Returns information on all available oEmbed providers.

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal