requestAlt.php
Table of Contents
Functions
- requestAlt() : mixed
- Reads an `alt` chain out of a **request slot**, presuming it came from the wire.
Functions
requestAlt()
Reads an `alt` chain out of a **request slot**, presuming it came from the wire.
requestAlt(mixed $alt) : mixed
Called at the point where the chain is read, never later: that is the only place where the origin is still known. The presumption is deliberate — an unmarked chain in a request slot is treated as untrusted, so forgetting to sign one gives the safe behaviour (its parameters get bound) rather than a silent hole.
nullstaysnull— there is no chain to qualify.- A chain signed with trustedAlt() is unwrapped to its bare form, so it flows on exactly as it did before this mechanism existed.
- Anything else is wrapped as a request chain, which alterExpression() answers by binding its parameters — or by raising, when no binder was supplied.
Parameters
- $alt : mixed
-
The raw slot content.
Tags
Return values
mixed —null, the bare chain of a signed one, or an AltChain request wrapper.