public function getConfigurationByRootPageId($pageId, $language = 0)
    {
        $connectionKey = $pageId . '|' . $language;
        $solrServers = $this->getAllConfigurations();

        if (isset($solrServers[$connectionKey])) {
            $solrConfiguration = $solrServers[$connectionKey];
        } else {
            /* @var $noSolrConnectionException NoSolrConnectionFoundException */
            $noSolrConnectionException = GeneralUtility::makeInstance(
                NoSolrConnectionFoundException::class,
                /** @scrutinizer ignore-type */  'Could not find a Solr connection for root page [' . $pageId . '] and language [' . $language . '].',
                /** @scrutinizer ignore-type */ 1275396474
            );
            $noSolrConnectionException->setRootPageId($pageId);
            $noSolrConnectionException->setLanguageId($language);

            throw $noSolrConnectionException;
        }

        return $solrConfiguration;
    }
public function getConfigurationByRootPageId($pageId, $language = 0)
    {
        $connectionKey = $pageId . '|' . $language;
        $solrServers = $this->getAllConfigurations();

        if (isset($solrServers[$connectionKey])) {
            $solrConfiguration = $solrServers[$connectionKey];
        } else {
            /* @var $noSolrConnectionException NoSolrConnectionFoundException */
            $noSolrConnectionException = GeneralUtility::makeInstance(
                NoSolrConnectionFoundException::class,
                /** @scrutinizer ignore-type */  'Could not find a Solr connection for root page [' . $pageId . '] and language [' . $language . '].',
                /** @scrutinizer ignore-type */ 1275396474
            );
            $noSolrConnectionException->setRootPageId($pageId);
            $noSolrConnectionException->setLanguageId($language);

            throw $noSolrConnectionException;
        }

        return $solrConfiguration;
    }
public function getConfigurationByRootPageId ( $ pageId , $ language = 0 ) { $ connectionKey = $ pageId . '|' . $ language ; $ solrServers = $ this -> getAllConfigurations ( ) ; if ( isset ( $ solrServers [ $ connectionKey ] ) ) { $ solrConfiguration = $ solrServers [ $ connectionKey ] ; } else { /* @var $noSolrConnectionException NoSolrConnectionFoundException */ $ noSolrConnectionException = GeneralUtility :: makeInstance ( NoSolrConnectionFoundException :: class , /** @scrutinizer ignore-type */ 'Could not find a Solr connection for root page [' . $ pageId . '] and language [' . $ language . '].' , /** @scrutinizer ignore-type */ 1275396474 ) ; $ noSolrConnectionException -> setRootPageId ( $ pageId ) ; $ noSolrConnectionException -> setLanguageId ( $ language ) ; throw $ noSolrConnectionException ; } return $ solrConfiguration ; }
Gets a Solr configuration for a root page ID.

@param int $pageId A root page ID.
@param int $language The language ID to get the configuration for as the path may differ. Optional, defaults to 0.
@return array A solr configuration.
@throws NoSolrConnectionFoundException
Gets a Solr configuration for a root page ID .