PHP Class Elastica\Transport\HttpAdapter

Inheritance: extends AbstractTransport
显示文件 Open project: ruflin/elastica

Public Methods

Method Description
__construct ( Connection $connection = null, Ivory\HttpAdapter\HttpAdapterInterface $httpAdapter ) Construct transport.
exec ( Request $elasticaRequest, array $params ) : Response Makes calls to the elasticsearch server.

Protected Methods

Method Description
_createElasticaResponse ( Ivory\HttpAdapter\Message\Response $httpAdapterResponse ) : Response
_createHttpAdapterRequest ( Request $elasticaRequest, Connection $connection ) : Ivory\HttpAdapter\Message\Request
_getUri ( Request $request, Connection $connection ) : string

Method Details

__construct() public method

Construct transport.
public __construct ( Connection $connection = null, Ivory\HttpAdapter\HttpAdapterInterface $httpAdapter )
$connection Elastica\Connection
$httpAdapter Ivory\HttpAdapter\HttpAdapterInterface

_createElasticaResponse() protected method

protected _createElasticaResponse ( Ivory\HttpAdapter\Message\Response $httpAdapterResponse ) : Response
$httpAdapterResponse Ivory\HttpAdapter\Message\Response
return Elastica\Response

_createHttpAdapterRequest() protected method

protected _createHttpAdapterRequest ( Request $elasticaRequest, Connection $connection ) : Ivory\HttpAdapter\Message\Request
$elasticaRequest Elastica\Request
$connection Elastica\Connection
return Ivory\HttpAdapter\Message\Request

_getUri() protected method

protected _getUri ( Request $request, Connection $connection ) : string
$request Elastica\Request
$connection Elastica\Connection
return string

exec() public method

All calls that are made to the server are done through this function
public exec ( Request $elasticaRequest, array $params ) : Response
$elasticaRequest Elastica\Request
$params array Host, Port, ...
return Elastica\Response Response object