InMemoryEventStore
Array-backed {@see EventStoreInterface}: same append/replay/nextSeq contract as {@see FileEventStore}, kept entirely in process memory. For tests and zero-file consumers — nothing is written to disk and nothing survives past the instance's lifetime.
InMemoryEventStore::append()
public function append(Milpa\EventStore\Event $event): voidAppends `$event` to the in-memory log. Events are never mutated or removed once appended.
Parameters
| Name | Type | Description |
|---|---|---|
| $event | Milpa\EventStore\Event |
InMemoryEventStore::replay()
public function replay(string $streamId): arrayAll events belonging to `$streamId`, in ascending `seq` order.
Parameters
| Name | Type | Description |
|---|---|---|
| $streamId | string |
InMemoryEventStore::nextSeq()
public function nextSeq(): intThe next `seq` to assign, one past the highest `seq` currently in the store (across every stream) — `1` for an empty store.
InMemoryEventStore::streams()
public function streams(): arrayEvery distinct stream id present in the store, in the order each first appears (ascending `seq` of its first event).