S3SessionPersistence
SessionPersistenceInterface storing one JSON object per session id (key <prefix><sid>.json) in a single S3 bucket.
The storage behaviour is ObjectStoreSessionPersistence, shared with the other object-store session backends; this class supplies the client.
Synopsis
Section titled “Synopsis”final class S3SessionPersistence extends ObjectStoreSessionPersistence
| Extends | ObjectStoreSessionPersistence |
| Source | S3SessionPersistence.php |
Constructor
Section titled “Constructor”__construct()
Section titled “__construct()”public function __construct(ObjectStoreClientInterface $client, string $keyPrefix = 'sessions/', SessionCodecInterface $codec = null): mixed
Defaults to the portable codec: for an object store the round-trip dominates, and a readable stored object is worth more than a compact one.
| Parameter | Type | Description |
|---|---|---|
$client | ObjectStoreClientInterface | The store, already bound to its bucket or container. |
$keyPrefix | string | Prepended to every session id to form the object key. |
$codec | SessionCodecInterface | Defaults to the portable codec: for an object store the round-trip dominates, and a readable stored object is worth more than a compact one. |
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() | ObjectStoreSessionPersistence | Deletes the session’s object from the store. |
load() | ObjectStoreSessionPersistence | Fetches the session’s object from the store and decodes it. |
save() | ObjectStoreSessionPersistence |