Skip to content

codixor/flysystem-google-storage

 
 

Repository files navigation

Flysystem Adapter for Google Cloud Storage

Author Build Status Software License Packagist Version Total Downloads

Installation

composer require superbalist/flysystem-google-storage

Usage

use Superbalist\Flysystem\GoogleStorage\GoogleStorageAdapter
use League\Flysystem\Filesystem;

$credentials = new \Google_Auth_AssertionCredentials(
    '[your service account]',
    [\Google_Service_Storage::DEVSTORAGE_FULL_CONTROL],
    file_get_contents('[[path to the p12 key file]]'),
    '[[your secret]]'
);

$client = new \Google_Client();
$client->setAssertionCredentials($credentials);
$client->setDeveloperKey('[[your developer key]]');

$service = new \Google_Service_Storage($client);

$adapter = new GoogleStorageAdapter($service, '[[your bucket name]]')

$filesystem = new Filesystem($adapter);

TODO

  • Unit tests to be written

About

Flysystem Adapter for Google Cloud Storage

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%