phpbotgram

MemoryStorageRecord
in package

FinalYes

Mutable value object holding a single FSM storage slot.

Mirrors the MemoryStorageRecord dataclass from aiogram/fsm/storage/memory.py:20-22:

Tags
dataclass

class MemoryStorageRecord: data: dict[str, Any] = field(default_factory=dict) state: str | None = None


PHP arrays are value-typed, so assigning `$record->data = $map` stores a
copy of `$map` — no additional deep-copy helper is required for scalar /
array values. Objects nested inside `data` are still referenced (shallow),
matching Python's `dict.copy()` semantics used by upstream `MemoryStorage`.

Table of Contents

Properties

$data  : array<string|int, mixed>
$state  : string|null

Methods

__construct()  : mixed

Properties

Methods

__construct()

public __construct([array<string, mixed> $data = [] ][, null|string $state = null ]) : mixed
Parameters
$data : array<string, mixed> = []

Arbitrary key-value payload for the FSM record.

$state : null|string = null

Serialised state name, or null when no state is active.

On this page

Search results