PHP Class Elastica\Transport\Guzzle

Author: Milan Magudia ([email protected])
Inheritance: extends AbstractTransport
Show file Open project: ruflin/elastica Class Usage Examples

Protected Properties

Property Type Description
$_guzzleClientConnection Curl resource to reuse.
$_scheme Http scheme.

Public Methods

Method Description
exec ( Request $request, array $params ) : Response Makes calls to the elasticsearch server.

Protected Methods

Method Description
_createPsr7Request ( Request $request, Connection $connection ) : GuzzleHttp\Psr7\Request
_getActionPath ( Request $request ) : string Builds the action path url for each request.
_getBaseUrl ( Connection $connection ) : string Builds the base url for the guzzle connection.
_getGuzzleClient ( string $baseUrl, boolean $persistent = true ) : Client Return Guzzle resource.

Method Details

_createPsr7Request() protected method

protected _createPsr7Request ( Request $request, Connection $connection ) : GuzzleHttp\Psr7\Request
$request Elastica\Request
$connection Elastica\Connection
return GuzzleHttp\Psr7\Request

_getActionPath() protected method

Builds the action path url for each request.
protected _getActionPath ( Request $request ) : string
$request Elastica\Request
return string

_getBaseUrl() protected method

Builds the base url for the guzzle connection.
protected _getBaseUrl ( Connection $connection ) : string
$connection Elastica\Connection
return string

_getGuzzleClient() protected method

Return Guzzle resource.
protected _getGuzzleClient ( string $baseUrl, boolean $persistent = true ) : Client
$baseUrl string
$persistent boolean False if not persistent connection
return GuzzleHttp\Client

exec() public method

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

Property Details

$_guzzleClientConnection protected static property

Curl resource to reuse.
protected static $_guzzleClientConnection

$_scheme protected property

Http scheme.
protected $_scheme