You are here

public function ResourceFetcher::__construct in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/media/src/OEmbed/ResourceFetcher.php \Drupal\media\OEmbed\ResourceFetcher::__construct()
  2. 9 core/modules/media/src/OEmbed/ResourceFetcher.php \Drupal\media\OEmbed\ResourceFetcher::__construct()

Constructs a ResourceFetcher object.

Parameters

\GuzzleHttp\ClientInterface $http_client: The HTTP client.

\Drupal\media\OEmbed\ProviderRepositoryInterface $providers: The oEmbed provider repository service.

\Drupal\Core\Cache\CacheBackendInterface $cache_backend: The cache backend.

File

core/modules/media/src/OEmbed/ResourceFetcher.php, line 47

Class

ResourceFetcher
Fetches and caches oEmbed resources.

Namespace

Drupal\media\OEmbed

Code

public function __construct(ClientInterface $http_client, ProviderRepositoryInterface $providers, CacheBackendInterface $cache_backend) {
  $this->httpClient = $http_client;
  $this->providers = $providers;
  $this->cacheBackend = $cache_backend;
}