public function swapCores($core, $otherCore, $method = self::METHOD_GET)
    {
        if (!$this->_coresUrl) {
            throw new Exception('Please call "setBasePath" before.');
        }

        $params = array();

        // construct our full parameters
        $params['action'] = 'SWAP';
        $params['core'] = $core;
        $params['other'] = $otherCore;

        $queryString = $this->_generateQueryString($params);

        if ($method == self::METHOD_GET)
        {
            return $this->_sendRawGet($this->_coresUrl . $this->_queryDelimiter . $queryString);
        }
        else if ($method == self::METHOD_POST)
        {
            return $this->_sendRawPost($this->_coresUrl, $queryString, FALSE, 'application/x-www-form-urlencoded; charset=UTF-8');
        }
        else
        {
            throw new Apache_Solr_InvalidArgumentException("Unsupported method '$method', please use the Service::METHOD_* constants");
        }
    }
public function swapCores($core, $otherCore, $method = self::METHOD_GET)
    {
        if (!$this->_coresUrl) {
            throw new Exception('Please call "setBasePath" before.');
        }

        $params = array();

        // construct our full parameters
        $params['action'] = 'SWAP';
        $params['core'] = $core;
        $params['other'] = $otherCore;

        $queryString = $this->_generateQueryString($params);

        if ($method == self::METHOD_GET)
        {
            return $this->_sendRawGet($this->_coresUrl . $this->_queryDelimiter . $queryString);
        }
        else if ($method == self::METHOD_POST)
        {
            return $this->_sendRawPost($this->_coresUrl, $queryString, FALSE, 'application/x-www-form-urlencoded; charset=UTF-8');
        }
        else
        {
            throw new Apache_Solr_InvalidArgumentException("Unsupported method '$method', please use the Service::METHOD_* constants");
        }
    }
public function swapCores ( $ core , $ otherCore , $ method = self :: METHOD_GET ) { if ( ! $ this -> _coresUrl ) { throw new Exception ( 'Please call "setBasePath" before.' ) ; } $ params = array ( ) ; // construct our full parameters $ params [ 'action' ] = 'SWAP' ; $ params [ 'core' ] = $ core ; $ params [ 'other' ] = $ otherCore ; $ queryString = $ this -> _generateQueryString ( $ params ) ; if ( $ method == self :: METHOD_GET ) { return $ this -> _sendRawGet ( $ this -> _coresUrl . $ this -> _queryDelimiter . $ queryString ) ; } else if ( $ method == self :: METHOD_POST ) { return $ this -> _sendRawPost ( $ this -> _coresUrl , $ queryString , FALSE , 'application/x-www-form-urlencoded; charset=UTF-8' ) ; } else { throw new Apache_Solr_InvalidArgumentException ( "Unsupported method '$method', please use the Service::METHOD_* constants" ) ; } }
core swap interface

@param string $core
@param string $otherCore
@param string $method The HTTP method (Service::METHOD_GET or Service::METHOD::POST)
@return Apache_Solr_Response

@throws Apache_Solr_HttpTransportException If an error occurs during the service call
@throws Apache_Solr_InvalidArgumentException If an invalid HTTP method is used
@throws Exception
core swap interface