MODE_ANCHOR
MODE_ANCHOR = 'anchor'
A frame that decodes with nothing else.
One encoded value, either self-contained or expressed against its previous version.
A value object rather than an array so a typo in a key is a type error instead of a silently absent field, and so the two modes cannot be confused: an anchor has no parent and depth zero, a delta has both, and the constructor refuses any other combination. That invariant is what lets DeltaCodec::decode() trust the frame it is handed.
__construct(string $mode, string $codec, string $bytes, string|null $parent = null, int $depth = 0, int $plainLength = 0) : mixed
Constructs a frame.
| string | $mode | DeltaFrame::MODE_ANCHOR or DeltaFrame::MODE_DELTA. |
| string | $codec | The codec id the bytes were produced by, as recorded for the store. |
| string | $bytes | The encoded bytes. |
| string|null | $parent | Digest of the value this frame was encoded against, or NULL for an anchor. |
| int | $depth | Links between this frame and its anchor; zero for an anchor. |
| int | $plainLength | Length of the decoded value, so a caller can size a buffer and a verifier can catch a truncated decode without decoding twice. |
When the mode, parent and depth do not describe a coherent frame.