Skip to content

EmitterTraitAware

  • Full name: \Qubus\Http\Emitter\Traits\EmitterTraitAware

Methods

assertNoPreviousOutput

Assert either that no headers have been sent or the output buffer contains no content.

protected assertNoPreviousOutput(): void

emitStatusLine

Emit the status line.

protected emitStatusLine(\Psr\Http\Message\ResponseInterface $response): void

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.

protected emitHeaders(\Psr\Http\Message\ResponseInterface $response): void

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

private normalizeHeaderName(string $headerName): string

Normalized header will be in the following format: Example-Header-Name

Parameters:

Parameter Type Description
$headerName string

private header(string $headerName, bool $replace, int $statusCode): void

Parameters:

Parameter Type Description
$headerName string
$replace bool
$statusCode int

closeConnection

protected closeConnection(): void


Automatically generated on 2025-10-13