Skip to content

Commit e62fab3

Browse files
author
Cesar Rodriguez
committed
removed service and added servicePath
1 parent ca2e3d5 commit e62fab3

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/Google/Service/Resource.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ class Google_Service_Resource
4242
'prettyPrint' => array('type' => 'string', 'location' => 'query'),
4343
);
4444

45-
/** @var Google_Service $service */
46-
private $service;
47-
4845
/** @var Google_Client $client */
4946
private $client;
5047

5148
/** @var string $serviceName */
5249
private $serviceName;
5350

51+
/** @var string $servicePath */
52+
private $servicePath;
53+
5454
/** @var string $resourceName */
5555
private $resourceName;
5656

@@ -59,8 +59,8 @@ class Google_Service_Resource
5959

6060
public function __construct($service, $serviceName, $resourceName, $resource)
6161
{
62-
$this->service = $service;
6362
$this->client = $service->getClient();
63+
$this->servicePath = $service->servicePath;
6464
$this->serviceName = $serviceName;
6565
$this->resourceName = $resourceName;
6666
$this->methods = isset($resource['methods']) ?
@@ -173,8 +173,6 @@ public function call($name, $arguments, $expected_class = null)
173173
}
174174
}
175175

176-
$servicePath = $this->service->servicePath;
177-
178176
$this->client->getLogger()->info(
179177
'Service Call',
180178
array(
@@ -186,7 +184,7 @@ public function call($name, $arguments, $expected_class = null)
186184
);
187185

188186
$url = Google_Http_REST::createRequestUri(
189-
$servicePath,
187+
$this->servicePath,
190188
$method['path'],
191189
$parameters
192190
);

0 commit comments

Comments
 (0)