From 79ba9cc09d1ce92c20463d704e68913c44825053 Mon Sep 17 00:00:00 2001 From: Sugeng Sulistiyawan Date: Fri, 18 Oct 2024 17:43:58 +0700 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- src/GoogleDriveComponent.php | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index e8e43c9..6820e7f 100644 --- a/README.md +++ b/README.md @@ -424,7 +424,7 @@ return [ 'clientId' => '', 'clientSecret' => '', 'refreshToken' => '', - 'folder' => '', + 'folderId' => '', // 'teamDriveId' => '', // 'sharedFolderId' => '', // 'options' => [], diff --git a/src/GoogleDriveComponent.php b/src/GoogleDriveComponent.php index 6e49f0e..da2902b 100644 --- a/src/GoogleDriveComponent.php +++ b/src/GoogleDriveComponent.php @@ -20,7 +20,7 @@ * 'clientId' => '', * 'clientSecret' => '', * 'refreshToken' => '', - * 'folder' => '', + * 'folderId' => '', * // 'teamDriveId' => '', * // 'sharedFolderId' => '', * // 'options' => [], @@ -59,7 +59,7 @@ class GoogleDriveComponent extends AbstractComponent /** * @var string */ - public $folder; + public $folderId; /** * @var string @@ -86,10 +86,6 @@ class GoogleDriveComponent extends AbstractComponent */ public function init() { - if (empty($this->applicationName)) { - throw new InvalidConfigException('The "applicationName" property must be set.'); - } - if (empty($this->clientId)) { throw new InvalidConfigException('The "clientId" property must be set.'); } @@ -129,7 +125,7 @@ protected function initAdapter() $this->client = $client; $service = new Drive($this->client); - $adapter = new GoogleDriveAdapter($service, $this->folder, $this->options); + $adapter = new GoogleDriveAdapter($service, $this->folderId, $this->options); if ($this->prefix) { $adapter = new PathPrefixedAdapter($adapter, $this->prefix);