You are here

public function SolrConnectorPluginBase::__sleep in Search API Solr 8.2

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

Overrides DependencySerializationTrait::__sleep

File

src/SolrConnector/SolrConnectorPluginBase.php, line 1022

Class

SolrConnectorPluginBase
Defines a base class for Solr connector plugins.

Namespace

Drupal\search_api_solr\SolrConnector

Code

public function __sleep() {

  // It's safe to unset the solr client completely before serialization
  // because connect() will set it up again correctly after deserialization.
  unset($this->solr);
  return parent::__sleep();
}