You are here

public function SendinblueHttpClient::__construct in SendinBlue 8

Same name and namespace in other branches
  1. 8.2 src/Tools/Http/SendinblueHttpClient.php \Drupal\sendinblue\Tools\Http\SendinblueHttpClient::__construct()

SendinblueHttpClient constructor.

Parameters

\Drupal\Core\Logger\LoggerChannelFactoryInterface $logger_factory: LoggerChannelFactory.

\GuzzleHttp\ClientInterface $http_client: ClientInterface.

File

src/Tools/Http/SendinblueHttpClient.php, line 52

Class

SendinblueHttpClient
Sendinblue REST client.

Namespace

Drupal\sendinblue\Tools\Http

Code

public function __construct(LoggerChannelFactoryInterface $logger_factory, ClientInterface $http_client) {
  if (!function_exists('curl_init')) {
    $msg = 'SendinBlue requires CURL module';
    $logger_factory
      ->get('sendinblue')
      ->error($msg);
    return;
  }
  $this->loggerFactory = $logger_factory;
  $this->client = $http_client;
}