Nexus API Reference

SwooleStreamingDetector
in package

FinalYes
Tags
psalm-api

Decides whether a PSR-7 response body should be streamed (per-chunk writes) vs sent in a single end() call.

Heuristic: getSize() === null means the stream's total length isn't known up front — that's the signal a producer is yielding chunks lazily (IteratorStream, generator-backed bodies). Concrete file/string streams always report a size.

Table of Contents

Methods

isStreaming()  : bool

Methods

isStreaming()

public static isStreaming(StreamInterface $body) : bool
Parameters
$body : StreamInterface
Return values
bool

        
On this page

Search results