You are here

public function SolrConnectorPluginBase::executeRequest in Search API Solr 8.3

Same name and namespace in other branches
  1. 8 src/SolrConnector/SolrConnectorPluginBase.php \Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase::executeRequest()
  2. 8.2 src/SolrConnector/SolrConnectorPluginBase.php \Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase::executeRequest()
  3. 4.x src/SolrConnector/SolrConnectorPluginBase.php \Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase::executeRequest()

Executes a request and returns the response.

Parameters

\Solarium\Core\Client\Request $request: The Solarium request object.

\Solarium\Core\Client\Endpoint|null $endpoint: (optional) The Solarium endpoint object.

Return value

\Solarium\Core\Client\Response The Solarium response object.

Throws

\Drupal\search_api_solr\SearchApiSolrException

Overrides SolrConnectorInterface::executeRequest

3 calls to SolrConnectorPluginBase::executeRequest()
BasicAuthTestSolrCloudConnector::executeRequest in tests/modules/search_api_solr_test/src/Plugin/SolrConnector/BasicAuthTestSolrCloudConnector.php
Executes a request and returns the response.
BasicAuthTestSolrConnector::executeRequest in tests/modules/search_api_solr_test/src/Plugin/SolrConnector/BasicAuthTestSolrConnector.php
Executes a request and returns the response.
SolrConnectorPluginBase::search in src/SolrConnector/SolrConnectorPluginBase.php
Executes a search query and returns the raw response.
2 methods override SolrConnectorPluginBase::executeRequest()
BasicAuthTestSolrCloudConnector::executeRequest in tests/modules/search_api_solr_test/src/Plugin/SolrConnector/BasicAuthTestSolrCloudConnector.php
Executes a request and returns the response.
BasicAuthTestSolrConnector::executeRequest in tests/modules/search_api_solr_test/src/Plugin/SolrConnector/BasicAuthTestSolrConnector.php
Executes a request and returns the response.

File

src/SolrConnector/SolrConnectorPluginBase.php, line 870

Class

SolrConnectorPluginBase
Defines a base class for Solr connector plugins.

Namespace

Drupal\search_api_solr\SolrConnector

Code

public function executeRequest(Request $request, ?Endpoint $endpoint = NULL) {
  $this
    ->connect();
  if (!$endpoint) {
    $endpoint = $this->solr
      ->getEndpoint();
  }
  try {
    return $this->solr
      ->executeRequest($request, $endpoint);
  } catch (HttpException $e) {
    $this
      ->handleHttpException($e, $endpoint);
  }
}