S3Provider
in package
implements
StorageInterface
Table of Contents
Interfaces
Properties
Methods
- __construct() : mixed
- S3Provider constructor.
- getBucketContents() : array<string|int, mixed>
- Get the contents of the bucket
- getSignedUrl() : string
- Get the signed URL for the given object
Properties
$bucket
public
string
$bucket
- The bucket name
$s3Client
public
S3Client
$s3Client
- The S3 client
Methods
__construct()
S3Provider constructor.
public
__construct(array<string|int, mixed> $config, string $bucket) : mixed
Parameters
- $config : array<string|int, mixed>
-
- The S3 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