Skip to content

Commit

Permalink
Merge pull request #23 from tutu-ru/master
Browse files Browse the repository at this point in the history
Method constructWithGuzzleClient not works
  • Loading branch information
joostfaassen authored Jun 27, 2018
2 parents 6df9a8d + f61f890 commit 9f35a13
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,21 @@ public function __construct($server = '', $version = 'v2')
public static function constructWithGuzzleClient(GuzzleClient $guzzleClient, $server, $version)
{
$client = new Client($server, $version);
$client->guzzleClient = $guzzleClient;
$client->setGuzzleClient($guzzleClient);
return $client;
}


/**
* Set custom GuzzleClient in Client
* @param GuzzleClient $guzzleClient
* @return Client
*/
public function setGuzzleClient(GuzzleClient $guzzleClient)
{
$this->guzzleclient = $guzzleClient;
return $this;
}

/**
* Set the default root directory. the default is `/`
Expand Down

0 comments on commit 9f35a13

Please sign in to comment.