You are here

public function SearchApiSolrBackend::__sleep in Search API Solr 8

Same name and namespace in other branches
  1. 4.x src/Plugin/search_api/backend/SearchApiSolrBackend.php \Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::__sleep()

Implements the magic __sleep() method.

Prevents the Solr connector from being serialized. There's no need for a corresponding __wakeup() because of getSolrConnector().

Overrides BackendPluginBase::__sleep

See also

getSolrConnector()

File

src/Plugin/search_api/backend/SearchApiSolrBackend.php, line 2863

Class

SearchApiSolrBackend
Apache Solr backend for search api.

Namespace

Drupal\search_api_solr\Plugin\search_api\backend

Code

public function __sleep() {
  $properties = array_flip(parent::__sleep());
  unset($properties['solrConnector']);
  return array_keys($properties);
}