Skip to content

Commit 0e71c68

Browse files
authored
Update Client.php
1 parent e78c485 commit 0e71c68

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/Client.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace PulkitJalan\Google;
44

5+
use Google_Client;
56
use PulkitJalan\Google\Exceptions\UnknownServiceException;
67

78
class Client
@@ -25,7 +26,7 @@ public function __construct(array $config, $userEmail = '')
2526
$this->config = $config;
2627

2728
// create an instance of the google client for OAuth2
28-
$this->client = new \Google_Client();
29+
$this->client = new Google_Client();
2930

3031
// set application name
3132
$this->client->setApplicationName(array_get($config, 'application_name', ''));
@@ -56,6 +57,20 @@ public function getClient()
5657
{
5758
return $this->client;
5859
}
60+
61+
/**
62+
* Setter for the google client.
63+
*
64+
* @param string $client
65+
*
66+
* @return self
67+
*/
68+
public function setClient(Google_Client $client)
69+
{
70+
$this->client = $client;
71+
72+
return $this;
73+
}
5974

6075
/**
6176
* Getter for the google service.

0 commit comments

Comments
 (0)