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
Methods
- __construct() : mixed
- Initializes Response
- type() : mixed
- Outputs a special data type and sets the required headers.
Constants
CSS
public
string
CSS
= 'css'
css
CSV
public
string
CSV
= 'csv'
CSV
GIF
public
string
GIF
= 'gif'
GIF
ICO
public
string
ICO
= 'ico'
ICO
JPG
public
string
JPG
= 'jpg'
JPG
JS
public
string
JS
= 'js'
JS
JSON
public
string
JSON
= 'json'
JSON
public
string
PDF
= 'pdf'
PNG
public
string
PNG
= 'png'
PNG
SVG
public
string
SVG
= 'svg'
SVG
TXT
public
string
TXT
= 'txt'
TXT
XML
public
string
XML
= 'xml'
XML
Properties
$headers
public
array<string|int, mixed>
$headers
= ["Content-Type:application/json"]
$cookies
private
mixed
$cookies
$data
private
mixed
$data
$status
private
int
$status
= 200
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