Skip to content
Corex

FlowRepository

Corex\Forms\Flow\FlowRepository · class · Forms layer

Owns flow and append-only version persistence.

__construct(FlowStore $store, BootLogger $logger)

Section titled “__construct(FlowStore $store, BootLogger $logger)”

appendVersion(FlowVersion $version): FlowVersion

Section titled “appendVersion(FlowVersion $version): FlowVersion”

Every flow that can be read. A record that cannot be is left out and named in the log. Each reader of this list used to get every flow or an exception, so one record without its payload emptied the Forms screen, the form filter on Submissions and Data, and the flow counts, all at once.

Every readable flow beside the draft it points at, for a list that shows both.

findVersion(int $flowId, int $versionNumber): ?FlowVersion

Section titled “findVersion(int $flowId, int $versionNumber): ?FlowVersion”

Every version of a flow, or none of them. A version that cannot be read is not left out the way a flow is in all(). Its number is part of what cannot be read, and appendVersion() asks this list whether a number is taken.