SapiStreamEmitter
- Full name:
\Qubus\Http\Emitter\SapiStreamEmitter
- Parent class:
\Qubus\Http\Emitter\BaseEmitter
- This class is marked as final and can't be subclassed
- This class is a Final class
Constants
Constant | Visibility | Type | Value |
---|---|---|---|
CONTENT_PATTERN_REGEX | private | '/(?P<unit>[\w]+)\s+(?P<start>\d+)-(?P<end>\d+)/(?P<size>\d+ |
Properties
maxBufferSize
Maximum output buffering size for each iteration.
Methods
getMaxBufferSize
Get the value of max buffer size
setMaxBufferSize
Set the value of max buffer size
Parameters:
Parameter | Type | Description |
---|---|---|
$maxBufferSize | int |
Throws:
emit
Emit a response.
Parameters:
Parameter | Type | Description |
---|---|---|
$response | \Psr\Http\Message\ResponseInterface |
emitStream
Emit response body as a stream
Parameters:
Parameter | Type | Description |
---|---|---|
$response | \Psr\Http\Message\ResponseInterface |
emitBody
Emit the response body by max buffer size
Parameters:
Parameter | Type | Description |
---|---|---|
$response | \Psr\Http\Message\ResponseInterface |
emitBodyRange
Emit the range of the response body by max buffer size.
private emitBodyRange(\Psr\Http\Message\ResponseInterface $response, \Qubus\Http\Emitter\ContentRange $range): void
Parameters:
Parameter | Type | Description |
---|---|---|
$response | \Psr\Http\Message\ResponseInterface | |
$range | \Qubus\Http\Emitter\ContentRange |
getContentRange
Get ContentRange
private getContentRange(\Psr\Http\Message\ResponseInterface $response): \Qubus\Http\Emitter\ContentRange|null
Parses the Content-Range header line from the response and generates ContentRange instance.
Parameters:
Parameter | Type | Description |
---|---|---|
$response | \Psr\Http\Message\ResponseInterface |
See Also:
- http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.16 -
Inherited methods
assertNoPreviousOutput
Assert either that no headers have been sent or the output buffer contains no content.
emitStatusLine
Emit the status line.
Emits the status line using the protocol version and status code from the response; if a reason phrase is available, it, too, is emitted.
Parameters:
Parameter | Type | Description |
---|---|---|
$response | \Psr\Http\Message\ResponseInterface |
emitHeaders
Emit response headers.
Loops through each header, emitting each; if the header value is an array with multiple values, ensures that each is sent in such a way as to create aggregate headers (instead of replace the previous).
Parameters:
Parameter | Type | Description |
---|---|---|
$response | \Psr\Http\Message\ResponseInterface |
normalizeHeaderName
Normalize a header name
Normalized header will be in the following format: Example-Header-Name
Parameters:
Parameter | Type | Description |
---|---|---|
$headerName | string |
header
Parameters:
Parameter | Type | Description |
---|---|---|
$headerName | string | |
$replace | bool | |
$statusCode | int |
closeConnection
emit
Emit a response.
- This method is abstract.
Parameters:
Parameter | Type | Description |
---|---|---|
$response | \Psr\Http\Message\ResponseInterface |
Automatically generated on 2025-10-13