Skip to content

AzureBlobSessionPersistence

SessionPersistenceInterface storing one JSON blob per session id (named <sid>.json) in a single Azure Blob container.

Azure takes the container per call, so the client is wrapped in an AzureBlobContainerClient that binds it and creates it on first write. Everything after that is the shared behaviour in ObjectStoreSessionPersistence.

final class AzureBlobSessionPersistence extends ObjectStoreSessionPersistence

ExtendsObjectStoreSessionPersistence
SourceAzureBlobSessionPersistence.php

public function __construct(ObjectStoreClientInterface $client, string $container = 'quiote-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.

ParameterTypeDescription
$clientObjectStoreClientInterfaceThe store, already bound to its bucket or container.
$containerstring
$codecSessionCodecInterfaceDefaults 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

These come from an ancestor and are documented where they are declared.

MethodDeclared inDescription
delete()ObjectStoreSessionPersistenceDeletes the session’s object from the store.
load()ObjectStoreSessionPersistenceFetches the session’s object from the store and decodes it.
save()ObjectStoreSessionPersistence