phpbotgram

Storage

Table of Contents

Interfaces

KeyBuilder
Contract for assembling a string key from an FSM {@see StorageKey} and an optional sub-record discriminator.
MongoCollectionInterface
Minimal collection interface required by `MongoStorage`.

Classes

BaseEventIsolation
Abstract base for FSM event-isolation strategies.
BaseStorage
Abstract base for all FSM storage backends.
DefaultKeyBuilder
Simple colon-joined key builder with an `fsm` prefix.
DisabledEventIsolation
A no-op event isolation strategy — concurrent updates are never serialised.
Lock
A thin wrapper around an optional `Amp\Sync\Lock` that implements the acquire/release pattern for FSM event isolation.
MemoryStorage
In-memory FSM storage backend.
MemoryStorageRecord
Mutable value object holding a single FSM storage slot.
MongoCollectionAdapter
Thin adapter that wraps `\MongoDB\Collection` and makes it satisfy `MongoCollectionInterface`.
MongoStorage
MongoDB-backed FSM storage.
RedisEventIsolation
Redis-backed FSM event isolation via a distributed SET NX PX lock.
RedisStorage
Redis-backed FSM storage using `amphp/redis ^2`.
SimpleEventIsolation
A mutex-backed event isolation strategy that serialises concurrent updates sharing the same `StorageKey`.
StorageKey
Immutable contextual key that identifies a single FSM record. Every FSM storage operation is addressed by one of these keys; the key encodes the Telegram context (bot, chat, thread, user, optional business connection) plus an optional `destiny` tag for advanced multi-slot scenarios.

Enums

StoragePart
Represents the three sub-record kinds that a key builder can address within a single FSM storage entry.
On this page

Search results