public function __construct($connection_params = null) { foreach ($connection_params as $connection) { $this->client = new Client($connection); // Usable connection is found if ($this->client->isConnected()) { break; } } }