You are here

public function SolrConnectorPluginBase::executeRequest 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::executeRequest()
  2. 8 src/SolrConnector/SolrConnectorPluginBase.php \Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase::executeRequest()
  3. 8.2 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

4 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.
Solr36TestConnector::executeRequest in modules/search_api_solr_legacy/tests/modules/search_api_solr_legacy_test/src/Plugin/SolrConnector/Solr36TestConnector.php
Executes a request and returns the response.
SolrConnectorPluginBase::search in src/SolrConnector/SolrConnectorPluginBase.php
Executes a search query and returns the raw response.
3 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.
Solr36TestConnector::executeRequest in modules/search_api_solr_legacy/tests/modules/search_api_solr_legacy_test/src/Plugin/SolrConnector/Solr36TestConnector.php
Executes a request and returns the response.

File

src/SolrConnector/SolrConnectorPluginBase.php, line 967

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);
  }
}