You are here

protected function SearchApiElasticsearchElastica::getTransportOptions in Search API Elasticsearch 7

Transport options supported by this library.

Return value

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

Overrides SearchApiElasticsearchAbstractService::getTransportOptions

File

modules/elastica/includes/SearchApiElasticsearchElastica.inc, line 967
Provides Elastica client for Search API Elasticsearch.

Class

SearchApiElasticsearchElastica
Search API Elasticsearch Elastica service class.

Code

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