Flow PHP

WritePlanner

FinalYes

A write with steps of its own becomes a branch the runtime feeds batch by batch.

Tags
type

Leaf = array{write: Write, loader: Loader, path: list<Node>, transaction: null|Transaction}

Methods

__construct()  : mixed
attach()  : SplObjectStorage<Node, array<int, Loader|BranchPipeline|TransactionGroup>>
Every write root attached at the spine node its chain meets, as the steps that node's pipeline gains.
branch()  : BranchPipeline
The branch fed from $host: the steps of $nodes, then $tail, cut at every breaker, numbered from next() on.
chain()  : array<int, Node>
$write first, then every node below it, stopping BEFORE the first node on the spine - so a bare Write sitting directly on a spine node is exactly [$write], and the node it attaches to is never part of its chain.
next()  : int
The id the next pipeline built here takes; the spine's pipelines continue from it.
write()  : Loader|BranchPipeline
writes()  : array<int, Loader|BranchPipeline|TransactionGroup>
A node several writes share feeds them ONCE - it is the point their rows fan out - and a transaction attaches where its children part, so a node they all share runs before it opens.

Methods

attach()

Every write root attached at the spine node its chain meets, as the steps that node's pipeline gains.

public attach(Writes $writes, SplObjectStorage<Node, Node> $onSpine) : SplObjectStorage<Node, array<int, Loader|BranchPipeline|TransactionGroup>>

Branch pipelines take the ids first; next() is where the spine's own cuts continue.

Parameters
$writes : Writes
$onSpine : SplObjectStorage<Node, Node>
Tags
throws
InvalidLogicException

when a write shares no node with the spine, a Write does not translate to a Loader, or the writes of one transaction attach to different nodes

Return values
SplObjectStorage<Node, array<int, Loader|BranchPipeline|TransactionGroup>>

chain()

$write first, then every node below it, stopping BEFORE the first node on the spine - so a bare Write sitting directly on a spine node is exactly [$write], and the node it attaches to is never part of its chain.

public chain(Write $write, SplObjectStorage<Node, Node> $onSpine) : array<int, Node>
Parameters
$write : Write
$onSpine : SplObjectStorage<Node, Node>
Tags
throws
InvalidLogicException

when the chain ends without reaching the spine

Return values
array<int, Node>

next()

The id the next pipeline built here takes; the spine's pipelines continue from it.

public next() : int
Return values
int

writes()

A node several writes share feeds them ONCE - it is the point their rows fan out - and a transaction attaches where its children part, so a node they all share runs before it opens.

public writes(array<int, Leaf> $leaves, Node $host) : array<int, Loader|BranchPipeline|TransactionGroup>
Parameters
$leaves : array<int, Leaf>

the writes hanging off $host, each with the nodes between $host and its Write

$host : Node
Tags
throws
InvalidLogicException

when a write outside a transaction shares a node with one of its children

Return values
array<int, Loader|BranchPipeline|TransactionGroup>
On this page

Search results