Skip to content

Commit d5fe6f2

Browse files
author
gusev
committed
Fixed method constructWithGuzzleClient
1 parent 6df9a8d commit d5fe6f2

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/Client.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,21 @@ public function __construct($server = '', $version = 'v2')
4242
public static function constructWithGuzzleClient(GuzzleClient $guzzleClient, $server, $version)
4343
{
4444
$client = new Client($server, $version);
45-
$client->guzzleClient = $guzzleClient;
45+
$client->setGuzzleClient($guzzleClient);
4646
return $client;
4747
}
48+
49+
50+
/**
51+
* Set custom GuzzleClient in Client
52+
* @param GuzzleClient $guzzleClient
53+
* @return Client
54+
*/
55+
public function setGuzzleClient(GuzzleClient $guzzleClient)
56+
{
57+
$this->guzzleclient = $guzzleClient;
58+
return $this;
59+
}
4860

4961
/**
5062
* Set the default root directory. the default is `/`

0 commit comments

Comments
 (0)