Elastica\Connection::setTransport PHP Method

setTransport() public method

public setTransport ( string | array $transport )
$transport string | array
    public function setTransport($transport)
    {
        return $this->setParam('transport', $transport);
    }

Usage Example

Beispiel #1
0
 /**
  * @expectedException \Elastica\Exception\ResponseException
  */
 public function testInvalidElasticRequest()
 {
     $connection = new Connection();
     $connection->setHost('localhost');
     $connection->setPort(9500);
     $connection->setTransport('Thrift');
     $client = new Client();
     $client->addConnection($connection);
     $index = new Index($client, 'missing_index');
     $index->getStatus();
 }
All Usage Examples Of Elastica\Connection::setTransport