From 64d814919fe42fafaba8ce9a570f46d786f011b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Wed, 4 Oct 2017 10:43:59 +0300 Subject: [PATCH] ensure $connectTimeout parameter for global wrapper as well --- rdb/global.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/rdb/global.php b/rdb/global.php index fd68869..ea2ea52 100644 --- a/rdb/global.php +++ b/rdb/global.php @@ -82,18 +82,20 @@ // ------------- Global functions in namespace r ------------- - /** - * @param null $optsOrHost - * @param null $port - * @param null $db - * @param null $apiKey - * @param null $timeout + * @param array|string $optsOrHost + * @param int $port + * @param string $db + * @param string $apiKey + * @param int $timeout + * @param int $connectTimeout * @return Connection + * @throws RqlDriverError + * @throws \Exception */ -function connect($optsOrHost = null, $port = null, $db = null, $apiKey = null, $timeout = null) +function connect($optsOrHost = null, $port = null, $db = null, $apiKey = null, $timeout = null, $connectTimeout = null) { - return new Connection($optsOrHost, $port, $db, $apiKey, $timeout); + return new Connection($optsOrHost, $port, $db, $apiKey, $timeout, $connectTimeout); } function db($dbName)