Skip to content

Internals Response Interface SenderInterface

Stefan Crkvenjakov edited this page Oct 7, 2026 · 1 revision

response\interface\SenderInterface

Framework Internals · Subsystem overview · Developer guide

Source: awt_src/classes/response/interface/SenderInterface.php · Snapshot 8411f4287706.

Response builds status, headers and data/file payloads, chooses a MIME sender, and emits HTTP output. JSON arrays are wrapped in a status/message/data envelope.

SenderInterface

Declaration and architectural role

interface SenderInterface

Constants, enum cases, traits and properties

No own constants, enum cases, traits or property declarations. Inherited members are documented on the parent reference page.

Method index

Method Signature
send public function send(mixed $payload, int $status, array $headers): void
supportedMimes public function supportedMimes(): array

send

Source line 14

public function send(mixed $payload, int $status, array $headers): void;

Parameters

Parameter Type, modifiers and default Purpose
$payload mixed $payload Raw data, file path, or structured array.
$status int $status HTTP status code.
$headers array $headers Extra headers to emit before sending body.

Emit the response to the client.

@param mixed $payload Raw data, file path, or structured array. @param int $status HTTP status code. @param array $headers Extra headers to emit before sending body.

Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.

supportedMimes

Source line 21

public function supportedMimes(): array;

MIME types this sender is responsible for.

@return string[]

Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.

Clone this wiki locally