$service
$service : object
Abstract class for implementing an Amazon S3 adapter.
This class serves as a base implementation for an Amazon S3 filesystem adapter. It provides core methods to interact with Amazon S3, such as reading, writing, deleting, and renaming files. It also supports metadata management, size calculation, mime type detection, and listing keys. Specific functionality, such as the S3 client creation, is left to the implementing classes.
__construct(array $config) : mixed
Constructor.
Initializes the adapter with configuration details, including the bucket name, credentials, and optional settings. Throws an exception if the required config parameters are missing.
array | $config | The configuration array with bucket, key, secret, and other options. |
If the configuration lacks required parameters.
ensureBucketExists() : bool
Ensures the specified bucket exists.
If the bucket does not exist and the create option is set to true, it will try to create the bucket. Throws a RuntimeException if the bucket does not exist and the create option is false.
if the bucket does not exist or could not be created.
True if the bucket exists or was successfully created.