You are here

protected function SearchApiElasticsearchService::getTransportOptions in Search API Elasticsearch 7.2

Get available transport options.

Return value

array An array of available transport options. Key: Transport name used by Elastica. Value: Display name.

1 call to SearchApiElasticsearchService::getTransportOptions()
SearchApiElasticsearchService::configurationForm in includes/SearchApiElasticsearchService.inc
@inheritdoc

File

includes/SearchApiElasticsearchService.inc, line 398
Provides Elasticsearch service for Search API.

Class

SearchApiElasticsearchService
@file Provides Elasticsearch service for Search API.

Code

protected function getTransportOptions() {
  $options = [
    'Http' => 'HTTP',
    'Https' => 'HTTPS',
    'Null' => 'NULL',
  ];
  if (class_exists('\\Guzzle\\Client')) {
    $options['Guzzle'] = 'Guzzle';
  }
  if (class_exists('\\Aws\\AwsClient')) {
    $options['AwsAuthV4'] = 'AwsAuthV4';
  }
  return $options;
}