class GrpcStreamedResponse extends IterableStreamedResponse implements HasTrailers

internal  
 

Carry a lazily produced protocol-owned gRPC stream to the HTTP/2 bridge.

Methods

__construct(iterable $chunks, array $headers, array $trailerNames, Closure $resolveTrailers, int $reservedContentLength)

No description

setChunks(iterable $chunks)

Set the chunks associated with the response.

setCallback(callable $callback)

Set the callback associated with the response.

bool
streamTo(Closure $write)

Stream retained chunks through the given writer.

setContent(string|null $content)

Set the response content.

array
trailerNames()

Get the trailer names known before response emission.

array
trailers()

Get the final response trailers.

int
reservedContentLength()

Return the first-frame content length reserved during header accounting.

void
completeUsing(Closure $completion)

Register cleanup for the call that owns this response.

void
complete()

Complete the call that owns this response.

bool
protocolStateIsIntact()

Determine whether middleware preserved the protocol-owned response state.

Details

at line 35
__construct(iterable $chunks, array $headers, array $trailerNames, Closure $resolveTrailers, int $reservedContentLength)

No description

Parameters

iterable $chunks
array $headers
array $trailerNames
Closure $resolveTrailers
int $reservedContentLength

at line 56
IterableStreamedResponse setChunks(iterable $chunks)

Set the chunks associated with the response.

Parameters

iterable $chunks

Return Value

IterableStreamedResponse

at line 69
IterableStreamedResponse setCallback(callable $callback)

Set the callback associated with the response.

Parameters

callable $callback

Return Value

IterableStreamedResponse

IterableStreamedResponse sendContent()

Send the response content.

bool streamTo(Closure $write)

internal  
 

Stream retained chunks through the given writer.

Parameters

Closure $write

Return Value

bool

at line 82
GrpcStreamedResponse setContent(string|null $content)

Set the response content.

Parameters

string|null $content

Return Value

GrpcStreamedResponse

at line 95
array trailerNames()

Get the trailer names known before response emission.

Return Value

array

at line 103
array trailers()

Get the final response trailers.

Return Value

array

at line 113
int reservedContentLength()

internal  
 

Return the first-frame content length reserved during header accounting.

Return Value

int

at line 123
void completeUsing(Closure $completion)

internal  
 

Register cleanup for the call that owns this response.

Parameters

Closure $completion

Return Value

void

at line 133
void complete()

internal  
 

Complete the call that owns this response.

Return Value

void

at line 146
bool protocolStateIsIntact()

internal  
 

Determine whether middleware preserved the protocol-owned response state.

Return Value

bool