Documentation

Response
in package

FinalYes

Table of Contents

Constants

CSS  = 'css'
CSV  = 'csv'
GIF  = 'gif'
ICO  = 'ico'
JPG  = 'jpg'
JS  = 'js'
JSON  = 'json'
PDF  = 'pdf'
PNG  = 'png'
SVG  = 'svg'
TXT  = 'txt'
XML  = 'xml'

Properties

$headers  : array<string|int, mixed>
$cookies  : mixed
$data  : mixed
$status  : int

Methods

__construct()  : mixed
Initializes Response
type()  : mixed
Outputs a special data type and sets the required headers.

Constants

Properties

$headers

public array<string|int, mixed> $headers = ["Content-Type:application/json"]

Methods

__construct()

Initializes Response

public __construct() : mixed

type()

Outputs a special data type and sets the required headers.

public type(mixed $data[, int $code = 200 ][, string $type = Response::JSON ]) : mixed
Parameters
$data : mixed
$code : int = 200
$type : string = Response::JSON

        
On this page

Search results