class ResponseRest extends Response

Class ResponseRest Create a serialized Response

Methods

sendContent()

Allow Tlog to write log stuff in the fina content.

from  Response
__construct( array $data = null, string $format = 'json', integer $status = 200, array $headers = array())

Constructor.

$this
setRestContent( array $data)

Set Content to be serialized in the response, array or object

Details

in Response at line 32
sendContent()

Allow Tlog to write log stuff in the fina content.

See also

\Thelia\Core\HttpFoundation\Response::sendContent()

at line 45
__construct( array $data = null, string $format = 'json', integer $status = 200, array $headers = array())

Constructor.

Parameters

array $data Array to be serialized
string $format serialization format, text, xml or json available
integer $status The response status code
array $headers An array of response headers

Exceptions

InvalidArgumentException When the HTTP status code is not valid

at line 74
$this setRestContent( array $data)

Set Content to be serialized in the response, array or object

Parameters

array $data array or object to be serialized

Return Value

$this