public function __construct($host, $port) { $this->host = $host; $this->port = $port; }
public function __construct($host = 'localhost', $port = 9200, $timeout = null) { parent::__construct($host, $port); if (null !== $timeout) { $this->setTimeout($timeout); } $this->ch = curl_init(); }