public function SolrConnectorPluginBase::getSolrMajorVersion in Search API Solr 4.x
Same name and namespace in other branches
- 8.3 src/SolrConnector/SolrConnectorPluginBase.php \Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase::getSolrMajorVersion()
- 8 src/SolrConnector/SolrConnectorPluginBase.php \Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase::getSolrMajorVersion()
- 8.2 src/SolrConnector/SolrConnectorPluginBase.php \Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase::getSolrMajorVersion()
Gets the current Solr major version.
Parameters
string $version: An optional Solr version string.
Return value
int The Solr major version.
Overrides SolrConnectorInterface::getSolrMajorVersion
2 calls to SolrConnectorPluginBase::getSolrMajorVersion()
- SolrConnectorPluginBase::getSolrBranch in src/
SolrConnector/ SolrConnectorPluginBase.php - Gets the current Solr branch name.
- StandardSolrCloudConnector::alterConfigFiles in src/
Plugin/ SolrConnector/ StandardSolrCloudConnector.php - Alter the newly assembled Solr configuration files.
File
- src/
SolrConnector/ SolrConnectorPluginBase.php, line 469
Class
- SolrConnectorPluginBase
- Defines a base class for Solr connector plugins.
Namespace
Drupal\search_api_solr\SolrConnectorCode
public function getSolrMajorVersion($version = '') : int {
[
$major,
] = explode('.', $version ?: $this
->getSolrVersion());
return (int) $major;
}