Documentation

GcpProvider
in package
implements StorageInterface

Table of Contents

Interfaces

StorageInterface

Properties

$bucket  : Bucket
$storageClient  : StorageClient

Methods

__construct()  : mixed
GcpProvider constructor.
getBucketContents()  : array<string|int, mixed>
Get the contents of the bucket
getSignedUrl()  : string
Get the signed URL for the given object

Properties

$storageClient

public StorageClient $storageClient
  • The storage client

Methods

__construct()

GcpProvider constructor.

public __construct(array<string|int, mixed> $config, string $bucket) : mixed
Parameters
$config : array<string|int, mixed>
  • The GCP configuration
$bucket : string
  • The bucket name

getBucketContents()

Get the contents of the bucket

public getBucketContents(string $prefix) : array<string|int, mixed>
Parameters
$prefix : string
  • The prefix
Return values
array<string|int, mixed>
  • The bucket contents

getSignedUrl()

Get the signed URL for the given object

public getSignedUrl(string $path, DateTime $expiration) : string
Parameters
$path : string
  • The file path
$expiration : DateTime
  • The expiration time
Return values
string
  • The signed URL

        
On this page

Search results