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

$_delimiter

$_delimiter : string

Delimiter

Type

string

$_enclosure

$_enclosure : string

Enclosure

Type

string

$_escape

$_escape : string

Escape

Type

string

$_lineBreak

$_lineBreak : string

Line break

Type

string

$_forceDownload

$_forceDownload : boolean

Force download

Type

boolean

$_fileName

$_fileName : string

File name of Csv

Type

string

$_rows

$_rows : array

Type

array

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 HTTP 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 a csv.

setDelimiters()

setDelimiters(string  $delimiter, string  $enclosure, string  $escape, string  $lineBreak) : void

Sets delimiters.

Parameters

string $delimiter
string $enclosure
string $escape
string $lineBreak

forceDownload()

forceDownload(boolean  $flag) : void

If true, the download will be forced.

Parameters

boolean $flag

setFileName()

setFileName(string  $fileName) : void

Set file name of exported csv

Parameters

string $fileName

serialize()

serialize(array  $row) : string

Serialize

Parameters

array $row

Returns

string

setRows()

setRows(array  $rows) 

Sets rows

Parameters

array $rows