Skip to content

Commit

Permalink
Update Client.php
Browse files Browse the repository at this point in the history
  • Loading branch information
pulkitjalan committed Mar 24, 2017
1 parent e78c485 commit 0e71c68
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/Client.php
Expand Up @@ -2,6 +2,7 @@

namespace PulkitJalan\Google;

use Google_Client;
use PulkitJalan\Google\Exceptions\UnknownServiceException;

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

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

// set application name
$this->client->setApplicationName(array_get($config, 'application_name', ''));
Expand Down Expand Up @@ -56,6 +57,20 @@ public function getClient()
{
return $this->client;
}

/**
* Setter for the google client.
*
* @param string $client
*
* @return self
*/
public function setClient(Google_Client $client)
{
$this->client = $client;

return $this;
}

/**
* Getter for the google service.
Expand Down

0 comments on commit 0e71c68

Please sign in to comment.