Properties

$format

$format : string

Format value

Type

string

$filters

$filters : mixed

filters

Type

mixed

$action

$action : mixed

action

Type

mixed

$request

$request : mixed

request

Type

mixed

$allowedFormats

$allowedFormats : array

All allowed formats + classes and mimetypes

Type

array

$mimeMapper

$mimeMapper : array

mimeMapper

Type

array

$defaultFormat

$defaultFormat : string

Default format value

Type

string

$data

$data : mixed

data

(default value: null)

Type

mixed

$status

$status : int

status

(default value: 200)

Type

int

$callback

$callback : mixed

callback

(default value: null)

Type

mixed

$headers

$headers : array

headers

Contains the custom response headers

Type

array

Methods

__construct()

__construct()

Constructor. Sets default values and sends data.

send()

send()

Sets status header, content-type header and outputs data.

Die is there for making sure nothing else is processed after this.

setFormat()

setFormat(bool $format) : void

setFormat function.

Parameters

bool $format

(default: false)

getFormat()

getFormat() : void

getFormat function.

setData()

setData(mixed $data) : void

setData function.

Parameters

mixed $data

getData()

getData() : void

getData function.

setStatus()

setStatus(mixed $status) : void

setStatus function.

Parameters

mixed $status

getStatus()

getStatus() : void

getStatus function.

setCallback()

setCallback(bool $callback) : void

setCallback function.

Parameters

bool $callback

(default: false)

getFilters()

getFilters() : void

getFilters function.

getAction()

getAction() : void

getAction function.

setRequest()

setRequest(mixed $request) : void

setRequest function.

Parameters

mixed $request

getRequest()

getRequest() : void

getRequest function.

addHeader()

addHeader(mixed $key, mixed $value) : void

addHeader function.

Parameters

mixed $key
mixed $value

removeHeader()

removeHeader(mixed $key) : void

removeHeader function.

Parameters

mixed $key

getHeaders()

getHeaders() : void

getHeaders function.

getCallback()

getCallback() : void

getCallback function.

parseDataToString()

parseDataToString(string $data)

Passes data to one of the format interfaces and returns string value

Parameters

string $data