Source of file BucketAdapter.php
Size: 0,542 Bytes - Last Modified: 2021-12-23T10:09:16+00:00
/var/www/docs.ssmods.com/process/src/src/Adapter/BucketAdapter.php
123456789101112131415161718192021222324252627 | <?php namespace SilverStripe\GoogleCloudStorage\Adapter; use Google\Cloud\Storage\StorageClient; class BucketAdapter { protected $bucket; protected $client; public function __construct($bucketname, $keyFile){ $this->client = new StorageClient([ 'keyFile'=> json_decode($keyFile, true) ]); $this->bucket = $this->client->bucket($bucketname); } public function getBucket(){ return $this->bucket; } public function getClient(){ return $this->client; } } |