Constants

HTTP_STATUS_KEY

HTTP_STATUS_KEY

Key to identify http status in headers

Properties

$_headers

$_headers : array

Type

array

$_outputCacheTTL

$_outputCacheTTL : integer

Output cache time to live

Type

integer

$_affectedTableUniqueNames

$_affectedTableUniqueNames : 

Type

$_ignoreAffectedTableUniqueNames

$_ignoreAffectedTableUniqueNames : 

Type

Methods

__construct()

__construct() 

Construct

hasData()

hasData() : boolean

Has data

Returns

boolean

setData()

setData(object|string  $data) : void

Set data

Parameters

object|string $data

setStatus()

setStatus(string  $httpStatusValue) : void

Sets http status

Parameters

string $httpStatusValue

getStatus()

getStatus() : string

Gets http status number

Returns

string

addHeader()

addHeader(string  $name, string  $value) : void

add Header

Parameters

string $name
string $value

getHeader()

getHeader(string  $name) : string

Returns a http header

Parameters

string $name

Returns

string

hasHeader()

hasHeader(string  $name) : boolean

Has http header

Parameters

string $name

Returns

boolean

sendHeaders()

sendHeaders() : void

Send Headers

httpRerouteUri()

httpRerouteUri(string  $uri) : void

Reroute to given uri

Parameters

string $uri

getOutputCacheTimeToLive()

getOutputCacheTimeToLive() : integer

Gets the output cache time to live

Returns

integer

setOutputCacheTimeToLive()

setOutputCacheTimeToLive(integer  $ttl) : integer

Sets the output cache time to live

Parameters

integer $ttl

(-1 will disable cache)

Returns

integer

addAffectedTableUniqueName()

addAffectedTableUniqueName(string  $tableUniqueName) 

Add a table unique name to the list of affected table names (Used for output caching)

Parameters

string $tableUniqueName

addIgnoreAffectedTableUniqueName()

addIgnoreAffectedTableUniqueName(  $tableUniqueName) 

Adds table unique name to ignore list

Parameters

$tableUniqueName

getAffectedTableUniqueNames()

getAffectedTableUniqueNames(boolean  $withoutIgnored = true) : array

Gets all affected table unique names for this response

Parameters

boolean $withoutIgnored

Returns

array

render()

render() : void

Render

prepareAndGetOutputData()

prepareAndGetOutputData(boolean  $parseTemplate = false) : mixed

Prepares the output data

Parameters

boolean $parseTemplate

Returns

mixed

_prepareJson()

_prepareJson(object  $data, boolean  $includeScript = false) : array

Collects data to be converted into a JSON format

Parameters

object $data
boolean $includeScript

Returns

array