-
-
Notifications
You must be signed in to change notification settings - Fork 0
StreamFactoryInterface
github-actions edited this page Mar 29, 2026
·
1 revision
Interface StreamFactoryInterface.
Extends the PSR-17 StreamFactoryInterface with additional functionality for creating streams from payloads. Implementations of this interface MUST be capable of generating standard PSR-7 streams as well as payload-aware streams.
- Full name:
\FastForward\Http\Message\Factory\StreamFactoryInterface - Parent interfaces:
StreamFactoryInterface
Creates a new stream containing the JSON-encoded representation of the provided payload.
public createStreamFromPayload(array $payload): \FastForward\Http\Message\PayloadStreamInterfaceThe returned stream MUST implement PayloadStreamInterface and MUST be readable and seekable. The payload MUST be JSON-encodable and MUST NOT contain resource types.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$payload |
array | the payload to encode and wrap in the stream |
Return Value:
the generated stream containing the payload