Elastification PHP Client API
Class

Elastification\Client\Client

class Client implements ClientInterface

The primary client class.

This class is aware of the transport layer and the requests/response layer. It serves as a kind of command pattern talking to a transport facade.

Methods

__construct(TransportInterface $transport, RequestManagerInterface $requestManager, null|string $elasticsearchVersion = null)

TODO: think about an array of clients or a decision manager for get the right client (maybe voter patern)

ResponseInterface send(RequestInterface $request)

performs sending the request

RequestInterface getRequest(string $name)

Details

at line 64
public __construct(TransportInterface $transport, RequestManagerInterface $requestManager, null|string $elasticsearchVersion = null)

TODO: think about an array of clients or a decision manager for get the right client (maybe voter patern)

Parameters

TransportInterface $transport
RequestManagerInterface $requestManager
null|string $elasticsearchVersion

at line 89
public ResponseInterface send(RequestInterface $request)

performs sending the request

Parameters

RequestInterface $request

Return Value

ResponseInterface

Exceptions

ClientException
RequestException

at line 149
public RequestInterface getRequest(string $name)

Parameters

string $name

Return Value

RequestInterface