phpEZ v0.4.0

CustomResponse
in package

AbstractYes

Base class for custom response types with specific Content-Type handling.

Subclasses must implement the stream() method to output the response body.

Tags
subpackage

http

Table of Contents

Properties

$headers  : array<string|int, mixed>|null
$statusCode  : int

Methods

__construct()  : mixed
The Content-Type of the request body this class handles.
stream()  : void

Properties

$headers

public array<string|int, mixed>|null $headers = null

$statusCode

public int $statusCode = 200

Methods

__construct()

The Content-Type of the request body this class handles.

public __construct([int $statusCode = 200 ][, array<string|int, mixed>|null $headers = null ]) : mixed
Parameters
$statusCode : int = 200
$headers : array<string|int, mixed>|null = null

stream()

public abstract stream() : void
On this page

Search results