private static function getHttpTransportAdapter($serverConfig)
    {
        switch ($serverConfig->getHttpTransportMethod()) {
            case HttpTransportMethod::HTTP_TRANSPORT_METHOD_CURL:
                $adapter = new Apache_Solr_HttpTransport_Curl();
                break;
            default:
                $adapter = new Apache_Solr_HttpTransport_FileGetContents();
        }

        if ($serverConfig->isUseHttpBasicAuth()) {
            $adapter->setAuthenticationCredentials(
                $serverConfig->getHttpBasicAuthUsername(),
                $serverConfig->getHttpBasicAuthPassword()
            );
        }

        return $adapter;
    }
private static function getHttpTransportAdapter($serverConfig)
    {
        switch ($serverConfig->getHttpTransportMethod()) {
            case HttpTransportMethod::HTTP_TRANSPORT_METHOD_CURL:
                $adapter = new Apache_Solr_HttpTransport_Curl();
                break;
            default:
                $adapter = new Apache_Solr_HttpTransport_FileGetContents();
        }

        if ($serverConfig->isUseHttpBasicAuth()) {
            $adapter->setAuthenticationCredentials(
                $serverConfig->getHttpBasicAuthUsername(),
                $serverConfig->getHttpBasicAuthPassword()
            );
        }

        return $adapter;
    }
private static function getHttpTransportAdapter ( $ serverConfig ) { switch ( $ serverConfig -> getHttpTransportMethod ( ) ) { case HttpTransportMethod :: HTTP_TRANSPORT_METHOD_CURL : $ adapter = new Apache_Solr_HttpTransport_Curl ( ) ; break ; default : $ adapter = new Apache_Solr_HttpTransport_FileGetContents ( ) ; } if ( $ serverConfig -> isUseHttpBasicAuth ( ) ) { $ adapter -> setAuthenticationCredentials ( $ serverConfig -> getHttpBasicAuthUsername ( ) , $ serverConfig -> getHttpBasicAuthPassword ( ) ) ; } return $ adapter ; }
Create HttpTransportAdapter based on configuration

@param $serverConfig
@return Apache_Solr_HttpTransport_Abstract
Create HttpTransportAdapter based on configuration