S3FilesystemAdapter
ListableFilesystemInterface over S3Client (SigV4 REST client, no aws-sdk-php).
The path-to-key mapping, the error translation and the listing (paging ListObjectsV2, folding CommonPrefixes back into relative paths) live in ListableObjectStoreFilesystemAdapter, shared with the other object-store drivers; this class supplies the client and the provider name that appears in its messages.
Synopsis
Section titled “Synopsis”final readonly class S3FilesystemAdapter extends ListableObjectStoreFilesystemAdapter
| Extends | ListableObjectStoreFilesystemAdapter |
| Source | S3FilesystemAdapter.php |
Constructor
Section titled “Constructor”__construct()
Section titled “__construct()”public function __construct(S3Client $client, string $keyPrefix = ''): mixed
| Parameter | Type | Description |
|---|---|---|
$client | S3Client | |
$keyPrefix | string |
Returns mixed
Inherited methods
Section titled “Inherited methods”These come from an ancestor and are documented where they are declared.
| Method | Declared in | Description |
|---|---|---|
delete() | ObjectStoreFilesystemAdapter | Deletes the object under $path. |
exists() | ObjectStoreFilesystemAdapter | Reports whether the store holds an object under $path. |
lastModified() | ObjectStoreFilesystemAdapter | Returns the object’s modification time, taken from its Last-Modified metadata. |
listContents() | ListableObjectStoreFilesystemAdapter | |
read() | ObjectStoreFilesystemAdapter | Returns the body of the object stored under $path. |
size() | ObjectStoreFilesystemAdapter | Returns the object’s size in bytes, taken from its Content-Length metadata. |
write() | ObjectStoreFilesystemAdapter | Stores $contents as the object under $path, replacing any existing object. |