$_connection
$_connection : \Elastica\Connection
Elastica Null Transport object.
This is used in case you just need a test transport that doesn't do any connection to an elasticsearch host but still returns a valid response object
$_connection : \Elastica\Connection
$_response : \Elastica\Response
Response you want to get from the transport.
__construct(\Elastica\Connection $connection = null)
Construct transport.
\Elastica\Connection | $connection | Connection object |
getConnection() : \Elastica\Connection
Connection object
setConnection(\Elastica\Connection $connection) : $this
\Elastica\Connection | $connection | Connection object |
exec(\Elastica\Request $request, array $params) : \Elastica\Response
Null transport.
\Elastica\Request | $request | Request object |
array | $params | Hostname, port, path, ... |
Response empty object
create(mixed $transport, \Elastica\Connection $connection, array $params = array()) : \Elastica\Transport\AbstractTransport
Create a transport.
The $transport parameter can be one of the following values:
mixed | $transport | A transport definition |
\Elastica\Connection | $connection | A connection instance |
array | $params | Parameters for the transport class |
getResponse(array $params = array()) : \Elastica\Response
Set response object the transport returns.
array | $params | Hostname, port, path, ... |
setResponse(\Elastica\Response $response) : $this
Set response object the transport returns.
\Elastica\Response | $response |
generateDefaultResponse(array $params) : \Elastica\Response
Generate an example response object.
array | $params | Hostname, port, path, ... |
$response