Repository navigation
Internals Response Interface ResponseInterface
Framework Internals · Subsystem overview · Developer guide
Source: awt_src/classes/response/interface/ResponseInterface.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.
interface ResponseInterfaceNo own constants, enum cases, traits or property declarations. Inherited members are documented on the parent reference page.
| Method | Signature |
|---|---|
| status | public function status(int $code): static |
| message | public function message(string $message): static |
| header | public function header(string $name, string $value): static |
| data | public function data(array $data): static |
| file | public function file(string $path): static |
| as | public function as(string $mimeType): static |
| send | public function send(): void |
public function status(int $code): static;| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$code |
int $code |
Operation input; the exact use, validation and propagation are shown in the implementation trace. |
Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.
public function message(string $message): static;| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$message |
string $message |
Response or exception message text. |
Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.
public function header(string $name, string $value): static;| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$name |
string $name |
Named key/label selected by this API; its exact scope is shown by the implementation trace. |
$value |
string $value |
Operation input; the exact use, validation and propagation are shown in the implementation trace. |
Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.
public function data(array $data): static;| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$data |
array $data |
Input data array or payload; see allowed fields and validation guards below. |
Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.
public function file(string $path): static;| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$path |
string $path |
Filesystem or route path as defined by the owning component; no universal path normalization is implied. |
Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.
public function as(string $mimeType): static;| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$mimeType |
string $mimeType |
Operation input; the exact use, validation and propagation are shown in the implementation trace. |
Explicitly force a content type (overrides auto-resolution).
Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.
public function send(): void;Resolve sender from Accept / file extension and emit response.
Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.
AWT Framework Wiki · Home · Installation Guide · Developer Guide · Framework Internals
Philosophy · Architecture · Known discrepancies · Verification
Installation Guide
Developer Guide
- Learning sequence
- First package
- Package structure
- Lifecycle
- Runtimes
- Events and objects
- Routing and controllers
- Views and resources
- Database and models
- Storage and caching
- Configuration and CLI
- Responses and errors
- Extension points
Framework Internals
- Architecture
- Bootstrap
- Packages
- Runtime
- Events and context
- Objects
- HTTP routing and controllers
- Rendering
- Blade integration
- Database
- Models
- Storage and caching
- Settings
- CLI
- Identity and sessions
- Responses
- Errors
- Complete source inventory
Documentation notes