Read from the package's own PHP files at the commit 9f9ec59efea8: its namespaces, classes, interfaces and enums, their public constants, properties and methods with their PHPDoc, and the options its factories take. Nothing of it is run.
GdriveDriveFactoryclassA folder of Google Drive - My Drive, a shared drive or a folder shared with the account - through masbug/flysystem-google-drive-ext (google/apiclient), paths by name as the Drive's web page shows them:
2 options · 1 method
Omnidrive\Gdrive
GdriveDriveFactory class
final class GdriveDriveFactory extends FlysystemDriveFactory GdriveDriveFactory.php:39
A folder of Google Drive - My Drive, a shared drive or a folder shared with the account - through masbug/flysystem-google-drive-ext (google/apiclient), paths by name as the Drive's web page shows them:
(new GdriveDriveFactory())->create(['client_id' => '...', 'client_secret' => '...', 'refresh_token' => '...', 'root' => 'Site/uploads']); (new GdriveDriveFactory())->create(['service_account' => '/run/secrets/drive.json', 'shared_drive_id' => '0ABC...']);
Options: an OAuth client's client_id, client_secret and refresh_token (an account's own Drive: the access token renewed on its own), or service_account (the JSON key of a service account, a path or the JSON itself) with subject (a Workspace user it acts as, by domain-wide delegation); root (the folder behind the drive's paths, as a path of names - or its ID with display_paths false); shared_drive_id (a shared drive), shared_folder_id (a folder shared with the account); display_paths (true: paths are names, as Drive shows them; false: paths are file IDs); permanent_delete (false: a deleted file goes to the bin); public_url (Drive serves no address of its own).
A file "public" is shared with anyone who has the link (reader), "private" not. With root as a path of names, the folder is looked up when the drive is built (the adapter's way); otherwise nothing is sent until the first operation.
Options
| Option | Default | |
|---|---|---|
display_paths | true | |
permanent_delete | false |
GdriveDriveFactory::__construct()
public function __construct(readonly ?ClientInterface $http = null)