You are here

public function InstagramEmbedFetcher::__construct in Media entity Instagram 8

Same name and namespace in other branches
  1. 8.2 src/InstagramEmbedFetcher.php \Drupal\media_entity_instagram\InstagramEmbedFetcher::__construct()

InstagramEmbedFetcher constructor.

Parameters

\GuzzleHttp\Client $client: A HTTP Client.

\Drupal\Core\Logger\LoggerChannelFactoryInterface $loggerFactory: A logger factory.

\Drupal\Core\Cache\CacheBackendInterface|null $cache: (optional) A cache bin for storing fetched instagram posts.

File

src/InstagramEmbedFetcher.php, line 56

Class

InstagramEmbedFetcher
Fetches instagram post via oembed.

Namespace

Drupal\media_entity_instagram

Code

public function __construct(Client $client, LoggerChannelFactoryInterface $loggerFactory, CacheBackendInterface $cache = NULL) {
  $this->httpClient = $client;
  $this->loggerFactory = $loggerFactory;
  $this->cache = $cache;
}