You are here

public function SolrConnectorPluginBase::createEndpoint in Search API Solr 4.x

Same name and namespace in other branches
  1. 8.3 src/SolrConnector/SolrConnectorPluginBase.php \Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase::createEndpoint()

Creates an endpoint.

Parameters

string $key: The endpoint ID.

array $additional_configuration: Configuration in addtion to the default configuration.

Return value

\Solarium\Core\Client\Endpoint The Solarium endpoint object.

Overrides SolrConnectorInterface::createEndpoint

1 call to SolrConnectorPluginBase::createEndpoint()
StandardSolrCloudConnector::getCheckpointsCollectionEndpoint in src/Plugin/SolrConnector/StandardSolrCloudConnector.php
Returns the Solr collection endpoint used to store topic checkpoints.

File

src/SolrConnector/SolrConnectorPluginBase.php, line 1193

Class

SolrConnectorPluginBase
Defines a base class for Solr connector plugins.

Namespace

Drupal\search_api_solr\SolrConnector

Code

public function createEndpoint(string $key, array $additional_configuration = []) {
  $this
    ->connect();
  $configuration = [
    'key' => $key,
    self::QUERY_TIMEOUT => $this->configuration['timeout'],
  ] + $additional_configuration + $this->configuration;
  unset($configuration['timeout']);
  return $this->solr
    ->createEndpoint($configuration, TRUE);
}