ChunkInterface
in
The interface of chunks returned by ResponseStreamInterface::current().
When the chunk is first, last or timeout, the content MUST be empty. When an unchecked timeout or a network error occurs, a TransportExceptionInterface MUST be thrown by the destructor unless one was already thrown by another method.
Tags
Table of Contents
- getContent() : string
- Returns the content of the response chunk.
- getError() : string|null
- In case of error, returns the message that describes it.
- getInformationalStatus() : array<string|int, mixed>|null
- Returns a [status code, headers] tuple when a 1xx status code was just received.
- getOffset() : int
- Returns the offset of the chunk in the response body.
- isFirst() : bool
- Tells when headers just arrived.
- isLast() : bool
- Tells when the body just completed.
- isTimeout() : bool
- Tells when the idle timeout has been reached.
Methods
getContent()
Returns the content of the response chunk.
public
getContent() : string
Tags
Return values
string —getError()
In case of error, returns the message that describes it.
public
getError() : string|null
Return values
string|null —getInformationalStatus()
Returns a [status code, headers] tuple when a 1xx status code was just received.
public
getInformationalStatus() : array<string|int, mixed>|null
Tags
Return values
array<string|int, mixed>|null —getOffset()
Returns the offset of the chunk in the response body.
public
getOffset() : int
Return values
int —isFirst()
Tells when headers just arrived.
public
isFirst() : bool
Tags
Return values
bool —isLast()
Tells when the body just completed.
public
isLast() : bool
Tags
Return values
bool —isTimeout()
Tells when the idle timeout has been reached.
public
isTimeout() : bool